next up previous index
Next: C301 Normal Frequency Up: CERNLIB Previous: C210 Number of

C300 Error Function and Complementary Error Function

Routine ID: C300
Author(s): G.A. ErskineLibrary: MATHLIB or Fortran Compiler Library
Submitter: K.S. KölbigSubmitted: 20.04.1970
Language: FortranRevised: 07.06.1992

Function subprograms ERF, ERFC and DERF, DERFC compute the error and complementary error functions

erf(x) = {2π}∫0xe-t2 dt, erfc(x) = {2π}∫x&inf;e-t2 dt,

defined for all values of the real argument x.

On CDC and Cray computers, the double-precision versions DERF and DERFC are not available.

Structure:

FUNCTION subprograms
User Entry Names: ERF, ERFC, DERF, DERFC

Usage:

In any arithmetic expression, ERF(X) or DERF(X) has the value erf( X),
ERFC(X) or DERFC(X) has the value erfc( X),

where ERF, ERFC, are of type REAL, DERF, DERFC, are of type DOUBLE PRECISION, and X has the same type as the function name.

Method:

Computation by rational Chebyshev approximation.

Accuracy:

The system-supplied versions (see Notes) have full machine accuracy. The CERN-supplied versions of ERF and ERFC have full single-precision accuracy (slightly less on CDC and Cray computers). The CERN-supplied versions of DERF and DERFC have an accuracy of 15 significant digits.

Notes:

On some computers, one or both of these functions is available in the system-supplied Fortran mathematical library. In this case the system-supplied version will be loaded instead of the CERN version.

References:

  1. W.J. Cody, Rational Chebyshev approximations for the error function, Math. Comp. 22 (1969) 631--637.

C301


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995