From fc2981407fed308efeb465414af47e8a099542a3 Mon Sep 17 00:00:00 2001 From: tessob Date: Thu, 8 Jun 2023 09:33:36 +0200 Subject: [PATCH] Update src/distribution/exponential.rs Co-authored-by: Warren Weckesser --- src/distribution/exponential.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } }