Class Erf
java.lang.Object
smile.math.special.Erf
The error function. The error function (or the Gauss error function)
is a special function of sigmoid shape which occurs in probability,
statistics, materials science, and partial differential equations.
It is defined as:
erf(x) = ∫0x e-t^2dt
The complementary error function, denoted erfc, is defined as
erfc(x) = 1 - erf(x). The error function and complementary
error function are special cases of the incomplete gamma function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleerf(double x) The Gauss error function.static doubleerfc(double x) The complementary error function.static doubleerfcc(double x) The complementary error function with fractional error everywhere less than 1.2 × 10-7.static doubleinverf(double p) The inverse error function.static doubleinverfc(double p) The inverse complementary error function.
-
Method Details
-
erf
public static double erf(double x) The Gauss error function.- Parameters:
x- a real number.- Returns:
- the function value.
-
erfc
public static double erfc(double x) The complementary error function.- Parameters:
x- a real number.- Returns:
- the function value.
-
erfcc
public static double erfcc(double x) The complementary error function with fractional error everywhere less than 1.2 × 10-7. This concise routine is faster than erfc.- Parameters:
x- a real number.- Returns:
- the function value.
-
inverfc
public static double inverfc(double p) The inverse complementary error function.- Parameters:
p- a real number.- Returns:
- the function value.
-
inverf
public static double inverf(double p) The inverse error function.- Parameters:
p- a real number.- Returns:
- the function value.
-