Class Erf

    • Constructor Summary

      Constructors 
      Constructor Description
      Erf()  
    • Method Summary

      Modifier and Type Method Description
      static double value​(double x)
      This implementation computes erf(x) using the regularized gamma function, following Erf, equation (3)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Erf

        public Erf()
    • 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, then Erf.value(x) is indistinguishable from either 1 or -1 at double precision, so the appropriate extreme value is returned.

        Parameters:
        x - the value.
        Returns:
        the error function.
        Throws:
        java.lang.ArithmeticException - if the algorithm fails to converge.
        See Also:
        RegularizedGamma.P.value(double, double, double, int)