Browse Source

When DF parameter was high, the CDF returned NaN value. This was resolved by using the GammaLowerRegularized function straight from the CDF instead of division and multipliciation by Gamma function.

cuda
bbieniek 12 years ago
parent
commit
e0e7292324
  1. 2
      src/Numerics/Distributions/ChiSquared.cs

2
src/Numerics/Distributions/ChiSquared.cs

@ -356,7 +356,7 @@ namespace MathNet.Numerics.Distributions
throw new ArgumentException(Resources.InvalidDistributionParameters);
}
return SpecialFunctions.GammaLowerIncomplete(freedom/2.0, x/2.0)/SpecialFunctions.Gamma(freedom/2.0);
return SpecialFunctions.GammaLowerRegularized(freedom/2.0, x/2.0);
}
/// <summary>

Loading…
Cancel
Save