Skip to content

Inverse gamma cdf numerical problems #373

@benjamin-lieser

Description

@benjamin-lieser

The inverse gamma cdf introduced in #227 does not work on all inputs.

For example

let gamma = Gamma::new(0.18,0.18).unwrap();
gamma.inverse_cdf(0.25);

we get Nan

I see that this is numerically tricky, but for example scipy has no problem giving the correct answer of 0.0016167, even in way more extreme cases is still gives finite answers.

I will try looking into this myself, but maybe someone has more experience with this. It seems the newton iterations are not working anymore. I also don't know in which range the cdf function is correctly working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions