Skip to main content

Module math

Module math 

Source
Expand description

Mathematical constants.

Constants§

APERY
Apéry’s constant ζ(3)
CATALAN
Catalan’s constant G
CBRT_2
∛2
CBRT_3
∛3
E
Euler’s number (e)
EPSILON
f64 machine epsilon (2⁻⁵²)
EPSILON_F32
f32 machine epsilon (2⁻²³) promoted to f64
EULER_GAMMA
Euler–Mascheroni constant γ
FEIGENBAUM_ALPHA
Feigenbaum constant α (period-doubling scaling)
FEIGENBAUM_DELTA
Feigenbaum constant δ (period-doubling ratio)
FOUR_PI
4π (solid angle of a sphere, steradians)
FRAC_1_PHI
1/φ = φ − 1
FRAC_1_PI
1/π
FRAC_1_SQRT_2
1/sqrt(2)
FRAC_1_SQRT_PI
1/√π
FRAC_1_SQRT_TAU
1/√(2π) (standard normal pdf peak value)
FRAC_2_PI
2/π
FRAC_2_SQRT_PI
2/sqrt(π)
FRAC_PI_2
π/2
FRAC_PI_3
π/3
FRAC_PI_4
π/4
FRAC_PI_6
π/6
FRAC_PI_8
π/8
FWHM_TO_SIGMA
1/(2√(2 ln 2)): converts Gaussian FWHM → σ
GIBBS
Wilbraham–Gibbs constant (2/π)·Si(π); Gibbs overshoot peak ratio
GLAISHER
Glaisher–Kinkelin constant A
KHINCHIN
Khinchin’s constant K₀
LN_2
ln(2)
LN_10
ln(10)
LN_PHI
ln(φ)
LN_PI
ln(π)
LN_SQRT_TAU
ln(√(2π)) = ½ ln(2π) (Gaussian log-likelihood term)
LN_TAU
ln(2π)
LOG2_10
log2(10)
LOG2_E
log2(e)
LOG10_2
log10(2)
LOG10_E
log10(e)
MAX
Largest finite f64
MIN_POSITIVE
Smallest positive normal f64
OMEGA
Omega constant Ω = W(1), solution of Ω·e^Ω = 1
PHI
Golden ratio φ = (1 + √5)/2
PI
Archimedes’ constant (π)
PI_SQUARED
π²
PLASTIC_NUMBER
Plastic number (real root of x³ = x + 1)
P_1_SIGMA
Probability within ±1σ of a normal distribution
P_2_SIGMA
Probability within ±2σ of a normal distribution
P_3_SIGMA
Probability within ±3σ of a normal distribution
SIGMA_TO_FWHM
2√(2 ln 2): converts Gaussian σ → FWHM
SILVER_RATIO
Silver ratio δ_S = 1 + √2
SQRT_2
sqrt(2)
SQRT_3
√3
SQRT_5
√5
SQRT_6
√6
SQRT_PI
√π
SQRT_TAU
√(2π) = √τ (Gaussian normalization)
TAU
The full circle constant (τ)
THREE_PI_OVER_2
3π/2
TWIN_PRIME
Twin prime constant C₂
TWO_PI_OVER_3
2π/3
ZETA_2
ζ(2) = π²/6
ZETA_4
ζ(4) = π⁴/90
Z_90
Standard normal two-sided z-score for 90 % confidence
Z_95
Standard normal two-sided z-score for 95 % confidence
Z_99
Standard normal two-sided z-score for 99 % confidence
Z_999
Standard normal two-sided z-score for 99.9 % confidence