jaxpolylog.polylogs._compute_pval_optimal#
- _compute_pval_optimal() float[source]#
Find the optimal transition parameter
t*for the"patch"method.The
"patch"method switches between two series expansions of Li_s(z):“inf” series:
Li_s(z) = Σ z^k / k^s, convergent for|z| < 1. AfterNterms the truncation error scales as|z|^N.“zero” expansion: Laurent series in
μ = log zaroundμ = 0(z = 1), convergent for|μ| < 2π. AfterNterms the error scales as(|μ|/(2π))^N = t^Nwheret = |μ|/(2π).
For real positive
z < 1both errors are equal when\[|z|^N = t^N \;\Longrightarrow\; |z| = t \;\Longrightarrow\; e^{-|μ|} = \frac{|μ|}{2π} \;\Longrightarrow\; e^{-2πt} = t \,.\]The unique positive solution of
e^{-2πt} = tis computed here by bisection and stored as the module constant_PVAL_OPTIMAL≈ 0.2322. This fixed point is independent ofN(thep_rangeparameter), so the optimal crossover does not change with the number of series terms.- Returns:
float – Optimal transition parameter
t*≈ 0.2322.