fn digamma(x: f64) -> f64
Digamma function approximation (Stirling series, accurate to ~1e-10 for x > 6).