ERFC 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

erfcf, erfc, erfcl, erfcw, erfcq, erfcll, erfcdf, erfcd, erfcdl, erfcdll - complementary error function

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float erfcf (float x);

extern double erfc (double x);

extern long double erfcl (long double x);

extern __float80 erfcw (__float80 x);

extern __float128 erfcq (__float128 x);

extern long_long_double erfcll (long_long_double x);

extern decimal_float erfcdf (decimal_float x);

extern decimal_double erfcd (decimal_double x);

extern decimal_long_double erfcdl (decimal_long_double x);

extern decimal_long_long_double erfcdll (decimal_long_long_double x);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the complementary error function of x, defined by
erfc(x) = (2/sqrt(pi)) integral(t = x:Infinity) exp(-t**2) dt = 1 - erf(x)
This is the area under the scaled normal curve from x to Infinity.

Caution: While the two functions share the simple relation erf(x) + erfc(x) = 1, it is only accurate to compute the larger from the smaller.


RETURN VALUES

If x is finite or Infinity, return the value of the error function, which lies in [0, +1] for x in [0, +Infinity], and in [1, 2] for x in [-Infinity, -0].

ERRORS

For NaN arguments, the returned value is a quiet NaN, and errno is set to EDOM.

SEE ALSO

erf(3CW), ierf(3CW), ierfc(3CW), iphi(3CW), iphic(3CW), phi(3CW), phic(3CW).