Skip to content

Commit

Permalink
test: test cases in issue #185 for Binomial inverse_cdf
Browse files Browse the repository at this point in the history
  • Loading branch information
YeungOnion committed May 23, 2024
1 parent 07a5abe commit bc911eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/distribution/binomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit bc911eb

Please sign in to comment.