DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

erf(S)


erf, erfc -- error functions

Syntax

   cc [flag ...] file ...  -lm [library ...]
   

#include <math.h>

double erf(double x);

float erff(float x);

long double erfl(long double x);

double erfc(double x);

float erfcf(float x);

long double erfcl(long double x);

Description

erf, erff and erfl return the error function of x, defined as:

erfc, erfcf and erfcl return 1.0 - erf(x). They are provided because of the extreme loss of relative accuracy when erf(x) is called for large x and the result is subtracted from 1.0 (for example, for x = 5, 12 places are lost).

Errors

On systems that support IEEE NaN, if x is a quiet NaN, that value is returned. If x is a signaling NaN, a quiet NaN is returned and the invalid operation exception is raised. In either case, errno is set to EDOM.

In the -Xt compilation mode, the error handling procedures may be changed with the function matherr.

See also

math(M), matherr(S)

Standards conformance

erf and erfc are conformant with:

X/Open Portability Guide, Issue 3, 1989 .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003