Utility functions used in ANOVA and post-hoc test calculations.
Lanczos log-gamma function.
Returns log Γ(z) for real z > 0. Accuracy is ~1e-14 relative. For very small z close to 0, the reflection formula ensures stability.