Not-Quite-Transcendental Functions For Logarithmic Interpolation of Tabulated Data
Peter C. Hammond, Jacob M. Fields, Jonah M. Miller, Brandon L. Barker
TL;DR
The paper tackles the bottleneck of interpolating tabulated data that spans many orders of magnitude in computational astrophysics by introducing not-quite-transcendental (NQT) transforms as fast, exactly invertible substitutes for logarithms. It develops two families, NQTo1 and the improved NQTo2, where the latter recovers second-order convergence on log-like grids via a $C^1$-continuous form $\lg_{o2}(x)$ and a quadratic-in-mantissa inverse, enabling efficient second-order logarithmic interpolation. Through isolated benchmarks and real EOS lookups, the authors demonstrate that NQTo2 often yields about 2× speedups over true logs on x86 and significant gains on ARM, with smaller improvements on GPUs, while maintaining comparable accuracy except in extreme phase-transition regions. Implemented in open-source packages such as Singularity-EOS and AthenaK, NQT methods provide a practical, portable path to accelerating astrophysical simulations that rely heavily on tabulated microphysics, with the strongest benefits arising from lower-order interpolation schemes.
Abstract
From tabulated nuclear and degenerate equations of state to photon and neutrino opacities, to nuclear reaction rates: tabulated data is ubiquitous in computational astrophysics. The dynamic range that must be covered by these tables typically spans many orders of magnitude. Here we present a novel strategy for accurately and performantly interpolating tabulated data that spans these large dynamic ranges. We demonstrate the efficacy of this strategy in tabulated lookups for nuclear and terrestrial equations of state. We show that this strategy is a faster \textit{drop-in} replacement for linear interpolation of logarithmic grids.
