ERF(3M)
NAME
erf, erfc − error function and complementary error function
SYNOPSIS
#include <math.h>
double erf (x)
double x;
double erfc (x)
double x;
DESCRIPTION
Erf returns the error function of x, defined as {2 over down 50 sqrt pi} int from 0 to x e sup {- t sup 2} dt .
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 (for example, for x = 5, twelve places are lost).
DEPENDENCIES
Series 800 (/lib/libm.a and ANSI C /lib/libM.a)
Erf returns 1.0 when x is +INFINITY , or −1.0 when x is −INFINITY .
Erfc returns 0.0 when x is +INFINITY , or 2.0 when x is −INFINITY .
ERRORS
Series 800 (/lib/libm.a and ANSI C /lib/libM.a)
Erf and erfc return NaN and set errno to EDOM when x is NaN.
SEE ALSO
isinf(3M), isnan(3M), exp(3M).
STANDARDS CONFORMANCE
erf: SVID2, XPG2, XPG3
erfc: SVID2, XPG2, XPG3
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989