DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

erf(S-osr5)


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-osr5)

Standards conformance

erf and erfc are conformant with:

X/Open Portability Guide, Issue 3, 1989 .


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005