Skip to content

Binomial::sample panics with extreme parameters #1378

@TheIronBorn

Description

@TheIronBorn
let distr = Binomial::new(1 << 31, f64::MIN_POSITIVE).unwrap();
let x = thread_rng().sample(distr);
println!("{}", x);

panics with Uniform::new called with low >= high at:

let gen_u = Uniform::new(0., p4).unwrap();

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-degenerateAlgorithm fails on some inputX-bugType: bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions