3.5.3.2.7 Erf

Definition:

The erf(x) function is the error function (or normal error integral). The function has the limiting values erf(0) = 0, and erf( ∞) = 1. Mathematically:

\mathrm{erf}(x)=\frac{2}{\sqrt\pi}\int_{0}^{x}e^{-u^2}du

Note that erf(-x) = -erf(x) is an odd function of x and erf(x) = 2*(Normal Distribution Function evaluated at x\sqrt2) - 1, where the Normal Distribution Function is:

\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{x}e^{-\frac{t^2}{2}}dt

Parameters:

x
the upper limit of integration