Fast accurate evaluation of meijer G-functions with new log-ratio method

Fast and accurate numerical evaluation of Meijer G-functions at near and exact confluence via log-ratio jets

Mathematical Software

Summary

Meijer G-functions are tricky to calculate accurately when certain parameters get very close, causing numerical errors or failures. The authors introduce a new technique called coefficient-level log-ratio jets that combines problematic terms to avoid error amplification during these close cases. Their method handles exact and near coincidences smoothly, keeps accuracy high, and uses slightly higher precision only when necessary. They implement this efficiently in a Julia package, showing results that closely match theoretical limits and outperform previous approaches.

What this means in practice

  • For scientific software developers: Improve numerical libraries by implementing robust Meijer G-function evaluation near singularities for more reliable mathematical computations.
  • For mathematical modelers: Use this method to accurately compute Meijer G-functions in models involving confluent poles without losing precision.

Authors

Timon S. Gutleb

Abstract

Slater residue expansions provide a fast route to numerical Meijer $G$-function evaluation, but become singular or severely ill-conditioned when active pole families coincide or nearly coincide, even though the underlying function remains finite. We introduce coefficient-level log-ratio jets, which pair the nearly cancelling residue terms and evaluate their combined contribution without the $1/|\varepsilon|$ cancellation amplification of the separated expansion. The resulting method has a continuous exact-confluence limit matching the corresponding Laurent residue and extends to isolated pole clusters of arbitrary multiplicity. We prove first-order convergence to the confluent limit and preservation of the Slater tail rate, and show that, under a standard accuracy model for the underlying primitives, the pole-spacing-dependent error amplification is removed in the supported unbalanced lower and upper regimes. Away from the convergent regime of a residue series, cancellation between the summed terms causes a second loss of accuracy that can persist at exact confluence. We certify it a posteriori through a series-level condition number and, where it is large, re-evaluate the residue series in double-double arithmetic, which restores near-machine precision at a small multiple of the Float64 cost and without arbitrary-precision arithmetic. Float64 experiments across both expansions, integer pole shifts, and multiplicities $r=2,3,4$ attain near-machine precision where raw Slater loses accuracy or becomes nonfinite. For pairs, the wall times are comparable to the ordinary Slater fast path and far below arbitrary-precision evaluation. The method is implemented in the open-source Julia package MeijerG.jl.