Skip to content

Commit

Permalink
Merge pull request #132 from doraneko94/master
Browse files Browse the repository at this point in the history
fix typo: statrs::distribution::Gamma sample_unchecked
  • Loading branch information
troublescooter committed Apr 25, 2021
2 parents 2fa0e88 + 1b9f9ff commit 8e51645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distribution/gamma.rs
Expand Up @@ -316,7 +316,7 @@ pub fn sample_unchecked<R: Rng + ?Sized>(rng: &mut R, shape: f64, rate: f64) ->
v *= v * v;
x *= x;
let u: f64 = rng.gen();
if u < 1.0 - 0.0331 * x * x || u.ln() < 0.5 * x + d * (1.0 - v - v.ln()) {
if u < 1.0 - 0.0331 * x * x || u.ln() < 0.5 * x + d * (1.0 - v + v.ln()) {
return afix * d * v / rate;
}
}
Expand Down

0 comments on commit 8e51645

Please sign in to comment.