The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: none
Declaration: function ErfApprox (x: double): double;

Calculating the error function by using the incomplete gamma function requires considerable time. If performance is an issue you may consider to use a Chebyshev approximation which is accurate to approx. 10-7. The function ErfApprox returns the approximated error function.

Hint: The complementary error function (often denoted as erfc) can be easily calculated from Erf: erfc(x) = 1-Erf(x).

Last Update: 2023-Feb-06