We present algorithms to approximate the scaled complementary error function, ??????(x(2))erfc(x) , and the Dawson integral, e-x(2x)?(0)e(t2)dt , to the best accuracy in the standard single, double, and quadruple prec...
详细信息
We present algorithms to approximate the scaled complementary error function, ??????(x(2))erfc(x) , and the Dawson integral, e-x(2x)?(0)e(t2)dt , to the best accuracy in the standard single, double, and quadruple precision arithmetic. The algorithms are based on expansion in Chebyshev subinterval polynomial approximations together with expansion in terms of Taylor series and/or Laplace continued fraction. The present algorithms, implemented as Fortran elemental modules, have been bench-marked versus competitive algorithms available in the literature and versus functions built-in in modern Fortran compilers, in addition to comprehensive tables generated with variable precision computations using the Matlab (TM) symbolic tool-box. The present algorithm for calculating the scaled complementary error function showed an overall significant efficiency improvement (factors between 1.3 and 20 depending on the compiler and tested dataset) compared to the built-in function "Erfc_scaled" in modern Fortran compilers, whereas the algorithm for calculating the Dawson integral is exceptional in calculating the function to 32 significant digits (compared to 19 significant digits reported in the literature) while being more effi-cient than competitive algorithms as well.
The errorfunction, as well as related functions, occurs in theoretical aspects of many parts of atmospheric science. This note presents a closed-form approximation for the error, complementaryerror, and scaled compl...
详细信息
The errorfunction, as well as related functions, occurs in theoretical aspects of many parts of atmospheric science. This note presents a closed-form approximation for the error, complementaryerror, and scaled complementary error functions, with maximum relative errors within 0.8%. Unlike other approximate solutions, this single equation gives answers within the stated accuracy for real variable x is an element of [0 infinity). The approximation is very useful in solving atmospheric science problems by providing analytical solutions. Examples of the utility of the approximation are: the computation of cirrus cloud physics inside a general circulation model, the cumulative distribution functions of normal and log-normal distributions, and the recurrence period for risk assessment. Copyright (C) 2007 Royal Meteorological Society
暂无评论