erfc

Complementary error function

erfc(x) = 1 - erf(x), and has high relative accuracy for values of x far from zero. (For values near zero, use erf(x)).

1 - erf(x) = 2/ √(π) $(INTEGRAL x, $(INFINITY)) exp( - t2) dt

More...
real
erfc
(
real a
)

Detailed Description

For small x, erfc(x) = 1 - erf(x); otherwise rational approximations are computed.

A special function expx2(x) is used to suppress error amplification in computing exp(-x^2).

Meta