A simple reform for treating the loss of accuracy of Humliceks W4 algorithm near the real axis
We present a simple reform for treating the reported problem of loss-of-accuracy near the real axis of Humlicek’s w4 algorithm, widely used for the calculation of the Faddeyeva or complex probability function. The reformed routine maintains the claimed accuracy of the algorithm over a wide and fine grid that covers all the domain of the real part, x, of the complex input variable, z=x+iy, and values for the imaginary part in the range y=[10-30, 10+30]
💡 Research Summary
The paper addresses a well‑known numerical deficiency of Humlicek’s W4 algorithm, which is widely used for evaluating the complex probability (Faddeyeva) function w(z). While the original W4 method combines four rational approximations to achieve high speed and reasonable accuracy across the complex plane, it suffers a severe loss of precision when the imaginary part y of the argument z = x + i y becomes very small, i.e., near the real axis. In this regime the exponential term exp(−z²) and the complementary error function erfc(−i z) tend to cancel, causing catastrophic cancellation and under‑flow in double‑precision arithmetic. Moreover, the original region‑switching thresholds depend only on the absolute value of y, which leads to abrupt changes in the approximation formula and amplifies rounding errors.
The authors propose a two‑fold reform that restores the claimed accuracy without sacrificing the algorithm’s speed. First, for |y| below a modest cutoff (≈10⁻⁸), they replace the standard four‑region scheme with a Taylor‑series based correction derived from the asymptotic expansion of w(z) near the real axis: \
Comments & Academic Discussion
Loading comments...
Leave a Comment