Skip to main content

normal_cdf

Function normal_cdf 

Source
pub fn normal_cdf(z: f64) -> f64
Expand description

Standard normal (mean 0, variance 1) cumulative distribution function: P(Z <= z).

Computed as 0.5 * erfc(-z / sqrt(2)) – routing through erfc directly rather than 0.5 * (1.0 + erf(z / sqrt(2))) – so the far lower tail (z very negative, where erf(z / sqrt(2)) is close to -1.0) is evaluated without cancellation. normal_cdf(NAN) is NAN; normal_cdf(INFINITY) is 1.0; normal_cdf(NEG_INFINITY) is 0.0.