Pith. sign in

REVIEW 3 major objections 4 minor 39 references

Not-Quite-Transcendental Functions For Logarithmic Interpolation of Tabulated Data

T0 review · 3 major / 4 minor · reviewed 2026-08-10 · deepseek-v4-flash

Pith's one-line read This paper claims that a family of cheap, exactly invertible not-quite-transcendental functions can replace true logarithms in linear interpolation of logarithmically spaced tables, giving the same accuracy at lower cost.

desk verdict NQTo2 is a real improvement over NQTo1, but the paper needs to say exactly what 'drop-in' means before the accuracy claim holds. read the letter →

arxiv 2501.05410 v1 pith:6EVMNXHS submitted 2025-01-09 physics.comp-ph cs.NAmath.NA

classification physics.comp-phcs.NAmath.NA
keywords not-quite-transcendentalfunctionslogarithmicinterpolationtabulatedequationsofstatefloating-pointbitmanipulationerrorperformanceportabilityneutronstarsimulationssecond-orderconvergence
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper claims that a family of cheap, exactly invertible 'not-quite-transcendental' functions can replace true logarithms in linear interpolation of logarithmically spaced tables, giving the same accuracy at lower cost. The specific new function, NQTo2, is everywhere smooth (C1) and fixes the slow-converging error spikes that hurt the earlier first-order version. On three test problems — a synthetic function, the SFHo nuclear equation of state, and a copper Sesame equation of state — NQTo2 interpolation is essentially indistinguishable from true log interpolation, while the underlying function evaluations are about twice as fast on x86 CPUs. Integrated into a neutron star simulation, the substitution speeds up the full calculation by as much as 30 percent. If the claim holds, simulation codes can gain this speedup by swapping a single function call.

What carries the argument

The central object is the second-order NQT pair, $\mathrm{lgo}_2$ and its inverse, built from the floating-point decomposition $x = m \cdot 2^{p}$. The forward map $\mathrm{lgo}_2(x) = -\frac{4}{3}(m-2)(m-1) + p$ is the unique quadratic that matches $\log_2$ at the control points $x = 2^p$ and satisfies the recurrence $\partial_x \mathrm{lgo}_2|_{2^p} = 2 \, \partial_x \mathrm{lgo}_2|_{2^{p+1}}$, which forces the derivative discontinuities of the first-order piecewise-linear version to vanish. The inverse requires extracting the bit-level mantissa, solving a quadratic, and recombining with the exponent. The whole method is carried by this $C^1$ property plus the integer-aliasing bit tricks that make the evaluation cheap.

What would settle it

Take a smooth test function with known derivatives and build both a logarithmic and an NQTo2 table at a fixed number of points; if the NQTo2 grid's interpolation error does not converge at second order in the table spacing once the table is fine enough that the NQTo2 deviation dominates, the central claim fails. Alternatively, run the paper's neutron star simulation on tables of increasing density and compare the fundamental oscillation eigenfrequencies between NQTo2 and true log interpolation: if the frequencies do not converge to the same value as the table densifies, the claimed accuracy equivalence is false.

Watch

Extended reading notes

Core claim

The paper introduces second-order not-quite-transcendental functions (NQTo2) as a drop-in replacement for logarithms in table interpolation. Since a positive float $x = m \cdot 2^{p}$ with $m \in [1/2,1)$, the function $\mathrm{lgo}_2(x) = -\frac{4}{3}(m-2)(m-1) + p$ is a Hermite interpolant of $\log_2(x)$ whose control points are powers of two; continuity of the value and derivative at those control points makes it everywhere $C^1$. This smoothness recovers second-order convergence in all $L^p$ norms when linear interpolation is performed on an NQTo2 grid. The function is exactly invertible by solving a quadratic for the mantissa, and the integer-aliased implementation runs in a small number of bit operations. The paper argues that any code using linear interpolation on logarithmic data can replace $\log$ with $\mathrm{lgo}_2$ and get essentially unchanged accuracy with significant speedups.

Load-bearing premise

The accuracy equivalence rests on the assumption that the deviation of NQTo2 from a true logarithm is small compared with the interpolation error of the table itself; the paper demonstrates this on only three test cases and explicitly leaves open the table density required for NQTo2 and logarithmic tables to produce matching neutron star oscillation eigenspectra.

Editorial extensions

If this is right

  • Any code currently doing linear interpolation on log-spaced tables can substitute NQTo2 for the logarithm with essentially no change in accuracy and, on x86 CPUs, about a 2x speedup in the function call.
  • An integrated neutron star simulation speeds up by up to 30 percent when NQTo2 replaces logarithmic interpolation in the equation-of-state lookups.
  • Higher-order interpolation schemes, such as biquintic interpolation, do not benefit from this replacement; the gain is specific to linear interpolation on logarithmic grids.
  • NQTo2 restores second-order convergence in $L^p$ norms for $p > 1$, which the first-order NQT lacked, making the error essentially indistinguishable from true log interpolation on the SFHo and copper equations of state.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The same Hermite-style smoothing could be applied to other piecewise-linear transforms (for example, logarithms in other bases, or single-precision floats), extending the speedup to any table lookup that currently pays for transcendental calls.
  • Because the integer-aliased implementation discards the lowest mantissa bits during squaring, there may be a precision floor in the transformed coordinate; production codes that need extreme dynamic range should test whether dropped bits affect quantities that depend on high-order derivatives.
  • The untested eigenspectrum agreement suggests a concrete design rule: when oscillation modes or other spectral quantities are the quantities of interest, the table density may need to be higher for NQTo2 than for true log interpolation, and that density should be measured before relying on the speedup in such simulations.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 4 minor

Summary. This manuscript introduces 'second-order not-quite-transcendental' functions (NQTo2), a piecewise quadratic, exactly invertible approximation to log2 designed to replace logarithms when linearly interpolating tabulated data over many orders of magnitude. The authors derive the function, discuss portable and integer-aliased implementations, benchmark log and exp variants on several CPU and GPU architectures, and test the approach on a synthetic function, the SFHo nuclear EOS, a Sesame copper EOS, and an AthenaK neutron star simulation. The main claim is that NQTo2 is a faster drop-in replacement for linear interpolation on logarithmic grids with essentially no loss of accuracy.

Significance. If the central claim is established, the method offers a simple, low-risk performance optimization for tabulated microphysics in astrophysical simulations, with open-source implementations and reported integrated speedups up to about 30%. The paper is also commendably candid: it corrects the prior NQTo1 claim of zero accuracy loss and explicitly flags the missing table-density/eigenspectra convergence study. However, the accuracy half of the claim is not yet rigorously supported: the results are mostly visual, no error norms as a function of resolution are reported, and the drop-in mode is not cleanly separated from a resampling mode.

major comments (3)
  1. [Section 3, Eq. (9)] Equation (9) is not satisfied by Eq. (10). For x = m 2^p with m in [1/2,1), Eq. (10) gives the derivative of lgo2 with respect to x at x = 2^p as 4/(3*2^p), and at x = 2^{p+1} also as 4/(3*2^p), so the ratio is 1 rather than the 2 required by Eq. (9). The stated derivation 'to fix these, we enforce ... (9)' is therefore internally inconsistent, even though the resulting function is indeed C^1. Please correct the condition or explain the actual constraint used, and adjust the surrounding convergence discussion accordingly.
  2. [Section 2, convergence theorem] The statement that 'second order convergence of linear interpolation is only guaranteed for everywhere C^1 functions' is not correct. A C^1 function whose derivative has modulus of continuity h^alpha is only guaranteed O(h^{1+alpha}) error, so C^1 alone does not imply O(h^2). The convergence argument should cite a sufficient condition such as Lipschitz derivative or piecewise C^2 with bounded second derivative; NQTo2-transformed smooth data plausibly satisfies such a condition, but the printed justification needs revision.
  3. [Section 1, Figs. 3-4, Sec. 4.3] The central 'drop-in replacement' claim conflates two different operations. If NQTo2 is substituted for log in an existing log-spaced table, the lookup coordinate u = lgo2(x) differs from the table coordinate u = log10(x) by a resolution-independent offset epsilon(x) with max |epsilon| approximately 9.7e-3 in log2 units. Linear interpolation at u + epsilon then carries an error term g'(u)*epsilon that remains as the log-grid spacing delta tends to zero, so the asymptotic error does not vanish. The visual comparisons in Figs. 3 and 4 cannot rule out a fixed relative error of order one percent, and Sec. 4.3 explicitly postpones the table-density comparison needed to assess this. The authors should either state clearly that the method requires resampling the table onto a uniform NQTo2 grid and specify that resampling procedure, or restrict the accuracy claim to finite resolution and quantify the error with norms as a function of delta.
minor comments (4)
  1. [Section 4.3] The word 'eiqenspectra' should be 'eigenspectra', and 'the density of table required' should read 'the table density required'.
  2. [Section 4.2] The word 'efficated' should likely be 'effected' or 'implemented'.
  3. [References] Two different works are cited as Miller et al. (2022): arXiv:2206.08957 and the Journal of Open Source Software paper. These should be disambiguated as 2022a and 2022b in the text and reference list.
  4. [Figures 2 and 6] The performance plots would benefit from a statement of the timing methodology, including the number of repetitions and any confidence intervals, and from a reconciliation of the 'indistinguishable on GPU' result in Sec. 4.2 with the up-to-30% speedup in Fig. 6.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: NQTo2 constants are fixed by smoothness constraints, not fitted to data; accuracy claims are benchmarked externally, and self-citations are background and explicitly corrected.

full rationale

The derivation chain is not circular. The constants in lgo2 (Eq. 10) are fixed by the continuity and derivative-matching conditions (8)-(9), which are statements about smoothness and about reproducing logarithmic scaling at dyadic control points; they are not fitted to any interpolation-error or EOS data. The accuracy claims are then checked against external benchmarks: the synthetic function in Figure 1, the SFHo EOS (Steiner et al. 2013) in Figure 3, and the Sesame copper EOS with EOSPAC ground truth in Figure 4, all compared against true logarithmic interpolation. No fitted parameter is renamed as a prediction. The self-citation to Miller et al. (2022) supplies the NQTo1 background, but the paper explicitly corrects that work's 'zero loss in accuracy' claim, and NQTo2 is constructed and tested independently here. The possible concern that the 'drop-in' wording glosses over a fixed coordinate offset between lgo2 and log2 is an accuracy/correctness question, not a circularity: the claim is not equivalent to its inputs by construction. Hence no circular steps.

Assumptions & free parameters 0 free parameters · 3 assumptions · 0 invented entities

The central claim introduces no fitted constants: the -4/3 coefficient in Equation (10) follows from the C^1 matching condition, not from data. The load-bearing assumptions are the IEEE-754 representation, the applicability of linear interpolation error analysis, and the empirical smoothness of tabulated EOS data over the tested ranges. No new physical entities are introduced.

assumptions (3)
  • domain assumption IEEE-754 floating point representation with frexp and ldexp semantics: any positive number can be written as m * 2^p with m in [1/2, 1) and p integer.
    Invoked in Section 2 and Appendix A to construct the NQT functions and the integer-aliased implementations. This is a property of the execution environment, not a mathematical given.
  • domain assumption The tabulated data used in astrophysical EOS lookups is smooth enough in the transformed coordinate that additional curvature from NQT functions is negligible relative to interpolation error.
    Used in Sections 4.2 and 4.3 to argue accuracy is essentially indistinguishable from true logs. Only tested on three cases and not proven by an error bound.
  • ad hoc to paper Second-order convergence of linear interpolation is guaranteed for everywhere C^1 functions.
    Stated in Section 2 to motivate NQTo2. The standard sufficient condition for O(h^2) error is a bounded second derivative, so this premise as stated is nonstandard and possibly incorrect. It drives the design choice but does not invalidate the empirical conclusions.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Not-Quite-Transcendental Functions For Logarithmic Interpolation of Tabulated Data." pith.science (2026). https://pith.science/paper/6EVMNXHS

@misc{pith2026250105410,
  author       = {Pith},
  title        = {Pith review of: Not-Quite-Transcendental Functions For Logarithmic Interpolation of Tabulated Data},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/6EVMNXHS}},
  note         = {Machine review of arXiv:2501.05410}
}
read the original 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.

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

39 extracted references · 16 canonical work pages

  1. [1]

    , " * write output.state after.block = add.period write newline

    ENTRY address archivePrefix author booktitle chapter doi edition editor eprint howpublished institution journal key month number organization pages publisher school series title misctitle type volume year version url label extra.label sort.label short.list INTEGERS output.state before.all mid.sentence after.sentence after.block FUNCTION init.state.consts ...

  2. [2]

    write newline

    " write newline "" before.all 'output.state := FUNCTION format.url url empty "" new.block "" url * "" * if FUNCTION format.eprint eprint empty "" archivePrefix empty "" archivePrefix "arXiv" = new.block " " eprint * " " * new.block " " eprint * " " * if if if FUNCTION format.doi doi empty "" " " doi * " " * if FUNCTION format.pid doi empty eprint empty ur...

  3. [3]

    !VZA4jժBH

    thebibliography [1] 20pt to REFERENCES 6pt =0pt -12pt 10pt plus 3pt =0pt =0pt =1pt plus 1pt =0pt =0pt -12pt =13pt plus 1pt =20pt =13pt plus 1pt \@M =10000 =-1.0em =0pt =0pt 0pt =0pt =1.0em @enumiv\@empty 10000 10000 `\.\@m \@noitemerr \@latex@warning Empty `thebibliography' environment \@ifnextchar \@reference \@latexerr Missing key on reference command E...

  4. [4]

    1999, Fast Inverse Square Root Algorithm

    Abrash, M., & Carmack, J. 1999, Fast Inverse Square Root Algorithm. https://github.com/id-Software/Quake-III-Arena

  5. [5]

    2024, arXiv e-prints, arXiv:2410.09146, 10.48550/arXiv.2410.09146

    Barker , B., Gogilashvili , M., Rodriguez-Bueno , J., et al. 2024, arXiv e-prints, arXiv:2410.09146, 10.48550/arXiv.2410.09146

  6. [6]

    1997, IEEE Computer Graphics and Applications, 17, 80, 10.1109/38.595279

    Blinn, J. 1997, IEEE Computer Graphics and Applications, 17, 80, 10.1109/38.595279

  7. [7]

    Burrows , A., Reddy , S., & Thompson , T. A. 2006, Nuclear Physics A, 777, 356, 10.1016/j.nuclphysa.2004.06.012

  8. [8]

    1980, Software Manual for the Elementary Functions, Prentice-Hall Foundations of Earth Science Series (Prentice-Hall)

    Cody, W., & Waite, W. 1980, Software Manual for the Elementary Functions, Prentice-Hall Foundations of Earth Science Series (Prentice-Hall). https://books.google.com/books?id=d4UZAQAAIAAJ

Show all 39 references
  1. [9]

    H., Amthor, A

    Cyburt, R. H., Amthor, A. M., Ferguson, R., et al. 2010, The Astrophysical Journal Supplement Series, 189, 240, 10.1088/0067-0049/189/1/240

  2. [10]

    2024, arXiv e-prints, arXiv:2409.10384, 10.48550/arXiv.2409.10384

    Fields , J., Zhu , H., Radice , D., et al. 2024, arXiv e-prints, arXiv:2409.10384, 10.48550/arXiv.2409.10384

  3. [11]

    C., Miller, J

    Grete, P., Dolence, J. C., Miller, J. M., et al. 2023, The International Journal of High Performance Computing Applications, 37, 465, 10.1177/10943420221143775

  4. [12]

    1970, IEEE Transactions on Computers, C-19, 97, 10.1109/T-C.1970.222874

    Hall, E., Lynch, D., & Dwyer, S. 1970, IEEE Transactions on Computers, C-19, 97, 10.1109/T-C.1970.222874

  5. [13]

    1877, Journal für die reine und angewandte Mathematik, 84, 70

    Hermite, C. 1877, Journal für die reine und angewandte Mathematik, 84, 70. http://eudml.org/doc/148345

  6. [14]

    2019, IEEE Standard for Floating-Point Arithmetic, Standard IEEE Std 754-2019, Institute of Electrical and Electronics Engineers (IEEE)

    IEEE Computer Society . 2019, IEEE Standard for Floating-Point Arithmetic, Standard IEEE Std 754-2019, Institute of Electrical and Electronics Engineers (IEEE). https://standards.ieee.org/standard/754-2019.html

  7. [15]

    A., & Rogers , F

    Iglesias , C. A., & Rogers , F. J. 1996, , 464, 943, 10.1086/177381

  8. [16]

    2002, IEEE Spectrum, 39, 42, 10.1109/MSPEC.2002.1021943

    Kushner, D. 2002, IEEE Spectrum, 39, 42, 10.1109/MSPEC.2002.1021943

  9. [17]

    P., & Johnson, J

    Lyon, S. P., & Johnson, J. D. 1992, Sesame: The L os A lamos N ational L aboratory Equation of State Database, Tech. Rep. LA-UR-92-3407, Los Alamos National Laboratory

  10. [18]

    M., Dolence , J

    Miller , J. M., Dolence , J. C., & Holladay , D. 2022, arXiv e-prints, arXiv:2206.08957, 10.48550/arXiv.2206.08957

  11. [19]

    M., Holladay, D., Meyer, C

    Miller, J. M., Holladay, D., Meyer, C. D., et al. 2022, Journal of Open Source Software, 7, 4367, 10.21105/joss.04367

  12. [20]

    M., et al

    Miller, J. M., et al. 2024, Journal of Open Source Software, 9, 6805, 10.21105/joss.06805

  13. [21]

    S., Davis , S

    Mills , B. S., Davis , S. W., Jiang , Y.-F., & Middleton , M. J. 2024, , 974, 166, 10.3847/1538-4357/ad6b21

  14. [22]

    2015, , 219, 24, 10.1088/0067-0049/219/2/24

    O'Connor , E. 2015, , 219, 24, 10.1088/0067-0049/219/2/24

  15. [23]

    O'Connor, E., & Ott, C. D. 2010, Classical and Quantum Gravity, 27, 114103. http://stacks.iop.org/0264-9381/27/i=11/a=114103

  16. [24]

    R., & Volkoff , G

    Oppenheimer , J. R., & Volkoff , G. M. 1939, Physical Review, 55, 374, 10.1103/PhysRev.55.374

  17. [25]

    H., Honnell, K

    Peterson, J. H., Honnell, K. G., Greeff, C., et al. 2012, AIP Conference Proceedings, 1426, 763, 10.1063/1.3686390

  18. [26]

    Pimentel, D. A. 2021, EOSPAC User’s Manual: V.6.5 (United States), 10.2172/1765849

  19. [27]

    J., & Iglesias , C

    Rogers , F. J., & Iglesias , C. A. 1992, , 79, 507, 10.1086/191659

  20. [28]

    A., Dolence , J

    Skinner , M. A., Dolence , J. C., Burrows , A., Radice , D., & Vartanyan , D. 2019, , 241, 7, 10.3847/1538-4365/ab007f

  21. [29]

    W., Hempel , M., & Fischer , T

    Steiner , A. W., Hempel , M., & Fischer , T. 2013, , 774, 17, 10.1088/0004-637X/774/1/17

  22. [30]

    M., Mullen , P

    Stone , J. M., Mullen , P. D., Fielding , D., et al. 2024, arXiv e-prints, arXiv:2409.16053, 10.48550/arXiv.2409.16053

  23. [31]

    X., & Swesty , F

    Timmes , F. X., & Swesty , F. D. 2000, , 126, 501, 10.1086/313304

  24. [32]

    Tolman, R. C. 1934, Proceedings of the National Academy of Sciences, 20, 169, 10.1073/pnas.20.3.169

  25. [33]

    Tolman , R. C. 1939, Physical Review, 55, 364, 10.1103/PhysRev.55.364

  26. [34]

    1915, Functions of a Complex Variable, American mathematical series (H

    Townsend, E. 1915, Functions of a Complex Variable, American mathematical series (H. Holt). https://books.google.com/books?id=JDUNAAAAYAAJ

  27. [35]

    R., Lebrun-Grandié, D., Arndt, D., et al

    Trott, C. R., Lebrun-Grandié, D., Arndt, D., et al. 2022, IEEE Transactions on Parallel and Distributed Systems, 33, 805, 10.1109/TPDS.2021.3097283

  28. [36]

    J., Smith , B

    Turk , M. J., Smith , B. D., Oishi , J. S., et al. 2011, , 192, 9, 10.1088/0067-0049/192/1/9

  29. [37]

    2012, Hacker's Delight (Pearson Education)

    Warren, H. 2012, Hacker's Delight (Pearson Education). https://books.google.com/books?id=VicPJYM0I5QC

  30. [38]

    2024, arXiv e-prints, arXiv:2409.10383, 10.48550/arXiv.2409.10383

    Zhu , H., Fields , J., Zappa , F., et al. 2024, arXiv e-prints, arXiv:2409.10383, 10.48550/arXiv.2409.10383

  31. [39]

    2021, , 508, 453, 10.1093/mnras/stab2517

    Zhu , Z., Jiang , Y.-F., Baehr , H., et al. 2021, , 508, 453, 10.1093/mnras/stab2517

Pith tools

Reviewed August 10, 2026 · model on record in the stance chip above.