Skip to main content

STIRLERR_MIN

Constant STIRLERR_MIN 

Source
pub const STIRLERR_MIN: LargeInt = 9;
Expand description

Below this the Stirling series in stirlerr is not accurate to binary64 at any depth (it is asymptotic, and the smallest term at n = 9 is under 1e-18, at n = 6 it is 1e-14). Callers handle n < STIRLERR_MIN some other way: a table for integers, or Gamma(n+1) directly, which is cheap and well conditioned at small argument.

Last built: 2026-09-08 21:35:55 UTC