The follow programs appear to hang indefinitely in the call poisson.sample(&mut rng):
f32
use rand_distr::{Distribution, Poisson};
fn main() {
let lambda = 1.0e37f32;
let poisson = Poisson::<f32>::new(lambda).unwrap();
let mut rng = rand::thread_rng();
let k = poisson.sample(&mut rng);
println!("{}", k);
}
f64
use rand_distr::{Distribution, Poisson};
fn main() {
let lambda = 1.0e306f64;
let poisson = Poisson::<f64>::new(lambda).unwrap();
let mut rng = rand::thread_rng();
let k = poisson.sample(&mut rng);
println!("{}", k);
}
I ran into this issue while testing gh-1296.
The follow programs appear to hang indefinitely in the call
poisson.sample(&mut rng):f32f64I ran into this issue while testing gh-1296.