1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Mathematical constants and Lanczos coefficients used by special functions.
// ============================================================================
// Mathematical Constants
// ============================================================================
/// Square root of pi: √π ≈ 1.7724538509055159
pub const SQRT_PI: f64 = 1.7724538509055160272981674833411451827975;
/// 2 / √π ≈ 1.1283791670955126 (used in erf)
pub const TWO_OVER_SQRT_PI: f64 = FRAC_2_SQRT_PI;
/// Euler-Mascheroni constant: γ ≈ 0.5772156649015329
pub const EULER_MASCHERONI: f64 = 0.5772156649015328606065120900824024310422;
/// ln(√(2π)) ≈ 0.9189385332046727 (used in Stirling's approximation)
pub const LN_SQRT_2PI: f64 = 0.9189385332046727417803297364056176398614;
// ============================================================================
// Lanczos Coefficients for Gamma Function
// ============================================================================
/// Lanczos approximation coefficients (g=7, n=9).
pub const LANCZOS_G: f64 = 7.0;
/// Lanczos coefficients for g=7.
pub const LANCZOS_COEFFICIENTS: = ;