erf, erfc
Purpose
Computes the error and complementary error functions.
Library
Math Library (libm.a)
Syntax
#include <math.h>
double erf (x) double erfc (x)
double x; double x;
Description
The erf subroutine returns the error function of x,
defined as: (2 / sqrt(&pi.)) times the integral from 0
to x of e(-t(2)) dt
The erfc subroutine returns 1.0 - erf(x). The erfc sub-
routine is provided because of the extreme loss of rela-
tive accuracy if erf(x) is called for large values of x
and the result is subtracted from 1.0. For example, 12
decimal places are lost when calculating (1.0 - erf(5)).
Related Information
In this book: "exp, log, log10, pow, sqrt."