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.
The inverse gamma cdf introduced in #227 does not work on all inputs.
For example
we get
NanI 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.