Skip to main content

exponential

Function exponential 

Source
pub fn exponential<R: RngCore + ?Sized>(rng: &mut R, mean: f64) -> f64
Expand description

Draw an exponential variate with the given mean via inverse-CDF.

-mean * ln(1 - u), computed with ln_1p(-u) for accuracy.