Class Erf

java.lang.Object
ffx.numerics.special.Erf

public class Erf extends Object
Static methods to evaluate erf(x) and erfc(x) for a real argument x. Rational functions are used that approximate erf(x) and erfc(x) to machine precision (approximately 15 decimal digits).

Adapted from an original program written by W. J. Cody, Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439

Since:
1.0
Author:
Michael J. Schnieders
  • Method Details

    • erf

      public static double erf(double arg)
      Evaluates erf(x) for a real argument x.
      Parameters:
      arg - the value to evaluate erf at.
      Returns:
      erf of the argument.
      Since:
      1.0
    • erfc

      public static double erfc(double arg)
      Evaluate erfc(x) for a real argument x.
      Parameters:
      arg - the value to evaluate erfc at.
      Returns:
      erfc of the argument.
      Since:
      1.0