Skip to main content

polylog

Function polylog 

Source
pub fn polylog(s: f64, z: f64) -> f64
Expand description

The polylogarithm Li_s(z) for real s and real z ≤ 1.

  • |z| ≤ ½: the defining series.
  • ½ < z < 1: the expansion in ln z with zeta coefficients.
  • −1 ≤ z < −½: the duplication formula Li_s(z) = 2^{1−s} Li_s(z²) − Li_s(−z).
  • z < −1: the inversion formula for integer s ≥ 1, and Li_s(−e^μ) = −F_{s−1}(μ) (the complete Fermi-Dirac integral) for other s > 0.
  • Integer s ≤ 1: the closed forms −ln(1−z), z/(1−z) and rational functions.

Li_s(1) = ζ(s) for s > 1 and +∞ otherwise. Returns NaN for z > 1 (the value is complex) and for z < −1 with non-integer s ≤ 0. Orders within about 1e-6 of an integer lose accuracy in the ln z expansion for ½ < z < 1.