Name
erf, erfc — error function and complementary error function
Synopsis
erf(
|
in x double precision); |
erfc(
|
in x double precision); |
Description
These functions compute the Gauss error function and its complement. Both work with double precision floating point numbers and return a result of that type.
: erf error function: erf(x) = (2/sqrt(pi)) * integral from 0 to x of exp(-t^2) dt.
: erfc complementary error function: erfc(x) = 1 - erf(x), computed accurately for large x.
For large positive x, erfc
avoids the loss of significance that would occur when computing 1 -
erf (x) directly.