Package org.apache.commons.numbers.gamma
Class ErfDifference
java.lang.Object
org.apache.commons.numbers.gamma.ErfDifference
Computes the difference between
error function values
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
This number solveserf(x) = 0.5
within 1 ulp. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
X_CRIT
private static final double X_CRITThis number solveserf(x) = 0.5
within 1 ulp. More precisely, the current implementations ofErf.value(double)
andErfc.value(double)
satisfy:Erf.value(X_CRIT) == 0.5
,Erf.value(Math.nextUp(X_CRIT)) > 0.5
,Erfc.value(X_CRIT) == 0.5
, andErfc.value(Math.nextUp(X_CRIT)) < 0.5
- See Also:
-
-
Constructor Details
-
ErfDifference
private ErfDifference()Private constructor.
-
-
Method Details
-
value
public static double value(double x1, double x2) - Parameters:
x1
- First value.x2
- Second value.- Returns:
Erf.value(x2) - Erf.value(x1)
.- Throws:
ArithmeticException
- if the algorithm fails to converge.
-