Package org.apache.commons.numbers.gamma
Class Erf
- java.lang.Object
-
- org.apache.commons.numbers.gamma.Erf
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublevalue(double x)This implementation computes erf(x) using theregularized gamma function, following Erf, equation (3)
-
-
-
Method Detail
-
value
public static double value(double x)
This implementation computes erf(x) using the
regularized gamma function, following Erf, equation (3)The returned value is always between -1 and 1 (inclusive). If
abs(x) > 40, thenErf.value(x)is indistinguishable from either 1 or -1 atdoubleprecision, so the appropriate extreme value is returned.- Parameters:
x- the value.- Returns:
- the error function.
- Throws:
ArithmeticException- if the algorithm fails to converge.- See Also:
RegularizedGamma.P.value(double, double, double, int)
-
-