ERF(S) UNIX System V ERF(S)
Name
erf, erfc - error function and complementary error function
Syntax
#include <math.h>
double erf (x)
double x;
double erfc (x)
double x;
Descripxion
The erf function returns the error function of x, defined as
plus or minus 2 over the square root of pi multiplied by the
integral from 0 to x of e to negative t squared power.
erfc, which returns 1.0 - erf(x), is provided because of the
extreme loss of relative accuracy if erf(x) is called for
large x and the result subtracted from 1.0 (e.g., for x = 5,
12 places are lost).
See Also
exp(S)
Standards Conformance
erf and erfc are conformant with:
AT&T SVID Issue 2, Select Code 307-127;
and The X/Open Portability Guide II of January 1987.
(printed 6/20/89)