[Previous] [Contents] [Next]

erfc(), erfcf()

Complementary error function

Synopsis:

#include <math.h>

double erfc ( double x );

float erfcf ( float x );

Library:

libm

Description:

The erfc() and erfcf() functions calculate the complementary error function of x; the result of the error function is subtracted from 1.0. This is useful since places disappear when x is large.

The erf() function computes:

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

This equality is true: erfc(-x) = 2 - erfc(x)

Returns:

The value of the error function. If x is NAN, NAN is returned.

Classification:

erfc() is standard Unix; erfcf() is ANSI (draft)

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

erf()


[Previous] [Contents] [Next]