jaxpolylog.polylogs._Li_over_z

Contents

jaxpolylog.polylogs._Li_over_z#

_Li_over_z(z: complex, s: int, p_range: int, approx: str, pval: float) complex[source]#

Description: Compute \(\mathrm{Li}_s(z)/z\) via a numerically stable evaluation that avoids dividing by z.

This quantity is the analytic derivative \(\mathrm{d}/\mathrm{d}z\,\mathrm{Li}_{s+1}(z) = \mathrm{Li}_s(z)/z\) used by the JVP rule of jax_polylog(). It is mathematically identical to jax_polylog(z, s, ...)/z but evaluated as either a closed-form polynomial-rational expression (for s 1) or a re-indexed power series (for s 2 with approx="inf"). Avoiding the explicit division by z prevents \(1/z^n\) factors from cascading through higher-order autodiff and overflowing float64 when \(|z|\) is very small (as happens in LCS-regime period integrals where \(|z| = e^{-2\pi q\cdot\mathrm{Im}(t)}\) may be \(\lesssim 10^{-100}\)).

Parameters:
  • z (complex) – The input value(s).

  • s (int) – The order parameter (one less than the order of the parent polylogarithm being differentiated).

  • p_range (int) – Number of terms in the series expansion.

  • approx (str) – Approximation method. See jax_polylog().

  • pval (float) – Transition parameter for the "patch" method.

Returns:

complex – The value \(\mathrm{Li}_s(z)/z\) evaluated stably.