Skip to main content

std_normal_cdf

Function std_normal_cdf 

Source
pub fn std_normal_cdf(x: f64) -> f64
Expand description

Standard-normal cumulative distribution function Φ(x).

Port of W. J. Cody’s rational Chebyshev approximation (the algorithm in R’s src/nmath/pnorm.c). On x ≥ 0 it reproduces R’s pnorm bit-for-bit across the whole table range [0, 10] (verified against R 4.6.0). For x < 0 it reflects via Φ(x) = 1 − Φ(−x); the GSVA table only ever evaluates x ≥ 0.