ERF(3M) Mathematical Library Functions ERF(3M)

erf, erff, erfl - error function

c99 [ flag... ] file... -lm [ library... ]
#include <math.h>
double erf(double x);

float erff(float x);

long double erfl(long double x);

These functions compute the error function of their argument x, defined as:

2/sqrt(pi)*intregral from 0 to x of exp(-t*t) dt

Upon successful completion, these functions return the value of the error function.

If x is NaN, a NaN is returned.

If x is ±0, ±0 is returned.

If x is ±Inf, ±1 is returned.

If x is subnormal, 2/sqrt(pi) * 2 is returned.

See attributes(7) for descriptions of the following attributes:

Interface Stability Standard
MT-Level MT-Safe

math.h(3HEAD), erfc(3M), feclearexcept(3M), fetestexcept(3M), isnan(3M), attributes(7), standards(7)

July 12, 2006 SunOS 5.11