Function rmathlib::stirlerr

source ·
pub fn stirlerr(n: f64) -> f64
Expand description

Computes the log of the error term in Stirling’s formula.

For n > 15, uses the series 1/12n - 1/360n^3 + … For n <=15, integers or half-integers, uses stored values. For other n < 15, uses lgamma directly (don’t use this to write lgamma!)