Documentation

Lightlike.Asymptotics.StirlingTests

Trust checks for the complex Stirling formula #

scripts/asymptotics/stirling_check.py compares μ(w) with log Γ(w + ½) − f(w) − ½ log 2π and with the bound norm_stirMu_le at complex points (numerical evidence).

Known value: Γ(1) = 1 gives √(2π) exp(f(½) + μ(½)) = 1.

Wrong input fails: no remainder. Γ(w + ½) = √(2π) exp(w log w − w) is false at w = ½: it would give √π e^{−½} = 1, i.e. π = e.

Wrong input fails: no midpoint shift. Γ(w) = √(2π) exp(f(w) + μ(w)) is false at w = ½, since Γ(½) = √π while the right side is Γ(1) = 1.