Error function
The integral is
erf(x) = 2/ √(π) $(INTEGRAL 0, x) exp( - t2) dt
The magnitude of x is limited to about 106.56 for IEEE 80-bit arithmetic; 1 or -1 is returned outside this range.
For 0 <= |x| < 1, a rational polynomials are used; otherwise erf(x) = 1 - erfc(x).
ACCURACY: Relative error: arithmetic domain # trials peak rms IEEE 0,1 50000 2.0e-19 5.7e-20
See Implementation
Error function
The integral is
erf(x) = 2/ √(π) $(INTEGRAL 0, x) exp( - t2) dt
The magnitude of x is limited to about 106.56 for IEEE 80-bit arithmetic; 1 or -1 is returned outside this range.
For 0 <= |x| < 1, a rational polynomials are used; otherwise erf(x) = 1 - erfc(x).
ACCURACY: Relative error: arithmetic domain # trials peak rms IEEE 0,1 50000 2.0e-19 5.7e-20