pub fn geometric_distribution<U>(uniform_generator: &mut U, p: f64) -> f64where
U: UniformGenerator,Expand description
The number of failures before the first success in independent trials of probability p
(P(k) = (1 − p)ᵏ p), by inversion of the exponential: ⌊ln(1 − u) / ln(1 − p)⌋.