Skip to content
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

Avoid spurious overflow and divide by zero in ibeta. #1026

Merged
merged 2 commits into from
Sep 2, 2023
Merged

Conversation

jzmaddock
Copy link
Collaborator

Add tests extracted from SciPy bug report.
Fixes #1006.
See also #1009.

@mdhaber
Copy link

mdhaber commented Sep 1, 2023

Thanks @jzmaddock! This seems to help on my M1 mac.

import scipy.stats
scipy.stats.beta(a=1e-323, b=5).ppf(.2)

Before this patch, I get an error; after this patch, I get 1.8189894035458565e-12. I'm not sure if the relative accuracy is great, since taking the cdf at that argument returns 1.0 instead of 0.2, but I'm guessing it will fix the crash I experience on other machines.

@jzmaddock jzmaddock merged commit 09d82da into develop Sep 2, 2023
59 checks passed
@NAThompson NAThompson deleted the issue1006 branch September 2, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug in boost libraries used by scipy.stats.beta
2 participants