DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

erf(3M)


erf, erfc -- error functions

Synopsis

   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.

References

matherr(3M)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004