-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for scipy issue 18302 #977
Conversation
Thanks for the fast response, @mborland! It looks like the code in |
I did get overflow with the default policy. Now that you bring it up I ran it on an ARM Mac which means long double = double. I think in this case it's worth effectively ignoring the overflow exception because we know what the result is supposed to be when that happens. |
Ah, I see. I tested on a Linux machine, where |
We recently added ARM and s390x to the CI system so we have 64, 80, and 128 bit long doubles are all tested now. Its helped find overflows and precision issues. |
Nice. I think it might be slightly better to use |
@mborland I think we should fix this updatream in ibeta_derivative here:
tools::min_value<T>() which may well not be. I'm edging towards the latter as the easier fix.
|
@jzmaddock This is green and I think hits your comments from both threads. |
@jzmaddock Any other changes for this one, or good to merge? |
Looks good to me! |
See: scipy/scipy#18302
Adds bounds checking so we don't return a pdf larger than beta, and catches an overflow exception when x is near
std::numeric_limits::min
.