Package org.apache.commons.numbers.gamma
Class ErfDifference
- java.lang.Object
-
- org.apache.commons.numbers.gamma.ErfDifference
-
public final class ErfDifference extends java.lang.ObjectComputes the difference betweenerror function values.
-
-
Field Summary
Fields Modifier and Type Field Description private static doubleX_CRITThis number solveserf(x) = 0.5within 1 ulp.
-
Constructor Summary
Constructors Modifier Constructor Description privateErfDifference()Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublevalue(double x1, double x2)
-
-
-
Field Detail
-
X_CRIT
private static final double X_CRIT
This number solveserf(x) = 0.5within 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:
- Constant Field Values
-
-
Method Detail
-
value
public static double value(double x1, double x2)- Parameters:
x1- First value.x2- Second value.- Returns:
Erf.value(x2) - Erf.value(x1).- Throws:
java.lang.ArithmeticException- if the algorithm fails to converge.
-
-