Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-lieser committed Oct 12, 2024
1 parent bc571a2 commit d9a7353
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rand_distr/src/hypergeometric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,11 @@ mod test {

#[test]
fn stirling() {
use special::Gamma;
let test = vec![0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0];
let test = [0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0];
for &v in test.iter() {
let ln_fac = ln_of_factorial(v);
dbg!(ln_fac);
assert!((ln_fac - (v + 1.0).ln_gamma().0).abs() < 1e-4);
assert!((special::Gamma::ln_gamma(v + 1.0).0 - ln_fac).abs() < 1e-4);
}
}
}

0 comments on commit d9a7353

Please sign in to comment.