diff --git a/src/distribution/exponential.rs b/src/distribution/exponential.rs index c335b895..b52e1899 100644 --- a/src/distribution/exponential.rs +++ b/src/distribution/exponential.rs @@ -120,7 +120,7 @@ impl ContinuousCDF for Exp { /// /// where `p` is the probability and `λ` is the rate fn inverse_cdf(&self, p: f64) -> f64 { - -(1.0 - p).ln() / self.rate + -(-p).ln_1p() / self.rate } }