erf

Computes the error function at x.

The error function measures the probability that a standard normally distributed random variable falls within the range -x*sqrt(2), x*sqrt(2). It ranges from -1 to 1, with erf(0) = 0. Computed via regularizedGammaP for high precision.

Example:

erf(0.0)  // 0.0
erf(1.0) // 0.8427... (about 84% of the area under the standard normal curve)
erf(-1.5) // -erf(1.5), the function is odd

Return

the error function value at x, in the range -1, 1.

Parameters

x

the point at which to evaluate.