Debian Codegraph @

debian/rust-vendor/statrs/src/consts.rs

raw
1 //! Defines mathematical expressions commonly used when computing distribution
2 //! values as constants
3
4 /// Constant value for `sqrt(2 * pi)`
5 pub const SQRT_2PI: f64 = 2.5066282746310005024157652848110452530069867406099;
6
7 /// Constant value for `ln(pi)`
8 pub const LN_PI: f64 = 1.1447298858494001741434273513530587116472948129153;
9
10 /// Constant value for `ln(sqrt(2 * pi))`
11 pub const LN_SQRT_2PI: f64 = 0.91893853320467274178032973640561763986139747363778;
12
13 /// Constant value for `ln(sqrt(2 * pi * e))`
14 pub const LN_SQRT_2PIE: f64 = 1.4189385332046727417803297364056176398613974736378;
15
16 /// Constant value for `ln(2 * sqrt(e / pi))`
17 pub const LN_2_SQRT_E_OVER_PI: f64 = 0.6207822376352452223455184457816472122518527279025978;
18
19 /// Constant value for `2 * sqrt(e / pi)`
20 pub const TWO_SQRT_E_OVER_PI: f64 = 1.8603827342052657173362492472666631120594218414085755;
21
22 /// Constant value for Euler-Masheroni constant `lim(n -> inf) { sum(k=1 -> n)
23 /// { 1/k - ln(n) } }`
24 pub const EULER_MASCHERONI: f64 =
25 0.5772156649015328606065120900824024310421593359399235988057672348849;
26
27 /// Targeted accuracy instantiated over `f64`
28 pub const ACC: f64 = 10e-11;