Expand description
§Scalar Distribution Utilities Module - High-Precision Scalar Statistical Functions
Fundamental scalar mathematical functions providing the computational building blocks for statistical distribution calculations with optimal numerical precision and SIMD acceleration. These utilities form the foundation for all distribution PDF, CDF, and quantile computations.
Constants§
- W8
- Auto-generated SIMD lane widths from build.rs
SIMD lane count for 8-bit elements (u8, i8).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W16
- SIMD lane count for 16-bit elements (u16, i16).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W32
- SIMD lane count for 32-bit elements (u32, i32, f32).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W64
- SIMD lane count for 64-bit elements (u64, i64, f64).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE.
Functions§
- binomial_
cdf_ scalar - Scalar binomial CDF
- binomial_
quantile_ cornish_ fisher - Compute the Cornish–Fisher-based binomial quantile for a single
pi. Returnsf64::NANfor any out-of-range or non-finite input. Does not handle nulls; caller is responsible. - chi2_
newton_ refine - Standard Newton refinement for chi-squared quantile computation.
- chi2_
newton_ refine_ extreme - Specialised Newton refinement for extreme chi-squared quantile computation.
- gamma_
func - Special cases:
- gamma_
pdf_ scalar - Scalar gamma PDF for Newton refinement
- half_
integer_ gamma - Evaluates gamma function at half-integer arguments using closed-form expression.
- incomplete_
beta - Regularised incomplete beta I_x(a, b).
- incomplete_
beta_ inv - Inverse regularised incomplete beta I_x(a, b)
- inv_
reg_ lower_ gamma - Inverse of the regularised lower incomplete gamma:
finds
xsuch that P(a, x) = p (a>0, 0≤p≤1). - inv_
reg_ upper_ gamma - Inverse of the regularised upper incomplete gamma:
finds
xsuch that Q(a, x) = q (a>0, 0≤q≤1), Q=1-P. - inv_
std_ normal - Computes the inverse standard normal cumulative distribution function (quantile function).
- inv_
std_ normal_ core - Core inverse standard normal function for left tail probabilities.
- ln_
choose - Computes logarithmic binomial coefficient for integer arguments with validation.
- ln_
choose_ simd - Generic SIMD logarithmic binomial coefficient with compile-time lane count.
- ln_
choose_ v - High-performance vectorised logarithmic binomial coefficient computation.
- ln_
gamma - Natural log of the absolute value of the Gamma function, ln|Γ(x)|.
- ln_
gamma_ plus1 - ln(k!) = ln_gamma(k+1)
- ln_
gamma_ simd - Vectorised Lanczos ln Γ for x >= 1.0 (reflection not needed in binomial) Helper due to missing simd helpers in std_lib
- normal_
cdf_ scalar - Evaluates standard normal cumulative distribution function with high accuracy.
- normal_
pdf_ scalar - Evaluates standard normal probability density function at given point.
- normal_
quantile_ scalar - Inverse CDF Φ⁻¹(q) for the normal distribution.
- reg_
lower_ gamma - Regularised lower incomplete gamma P(a, x)
- regularised_
gamma_ p - Regularised lower incomplete gamma (series + continued fraction).