From 6a25feac74ad5049d3137a427c5f8d241b7f06ec Mon Sep 17 00:00:00 2001 From: Orion Yeung <11580988+orionyeung001@users.noreply.github.com> Date: Thu, 23 May 2024 18:12:02 -0500 Subject: [PATCH] test: test cases in issue #185 for Binomial inverse_cdf --- src/distribution/binomial.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/distribution/binomial.rs b/src/distribution/binomial.rs index 38499617..2b4a3ea3 100644 --- a/src/distribution/binomial.rs +++ b/src/distribution/binomial.rs @@ -569,6 +569,9 @@ mod tests { fn test_inverse_cdf() { let invcdf = |arg: f64| move |x: Binomial| x.inverse_cdf(arg); test_case(0.4, 5, 2, invcdf(0.3456)); + + // cases in issue #185 + test_case(0.018, 465, 1, invcdf(3.472e-4)); test_case(0.5, 6, 4, invcdf(0.75)); }