Skip to main content

trigamma_f64

Function trigamma_f64 

Source
fn trigamma_f64(x: f64) -> f64
Expand description

Compute trigamma(x) using asymptotic expansion and recurrence.

For large x, use the asymptotic series: trigamma(x) ~ 1/x + 1/(2x^2) + sum_{k=1..} B_{2k}/x^{2k+1} where B_{2k} are Bernoulli numbers. For small x, use trigamma(x) = trigamma(x+1) + 1/x^2 repeatedly.