-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
BUG: exp(NINF) returns underflow error after version 1.20 #20891
Comments
@seberg taking a look. |
Just had a brief search, and it says here
So, while the underflow warning here seems incorrect to me, that bolsters the argument that we should likely not bother too much about underflows if this is not an easy fix. |
The fix is simple (or at least I think it is), but its triggering a lot of unrelated test failures :/ For example, I get an |
That seems extremely strange? The |
yup, the test failures look pretty similar and unrelated. But at least it gives me a direction to look into. |
r-devulap@76f8584 fixes this bug which is a simple fix but triggers a bug in gcc (even gcc-10) which results in a ton of test failures (see #20356 (comment)). Still thinking of a work around for the bug. |
PR #20991 fixes this problem. |
Can confirm:
Thanks!
|
This patch seems to work fine too:
|
Describe the issue:
We have an interesting situation where a test suite that checks the value of e^-inf is behaving differently depending on Numpy version. With numpy version 1.19.5 and 1.20.3 we consistently get "0.0" as the result. Later versions- 1.21 and 1.22- raise an underflow error. We are running Python 3.8.6 built by GCC 10.2.0 and using virtual environments to install these Numpy versions.
A further confounding factor is that on our slightly older processors we don't get this underflow, instead returning 0. The Python and GCC toolchains is the same thanks to environment modules and the OS and patches are the same on both generations, but the older processors (Intel Xeon E5-2667) return 0 and the newer (Intel Xeon Gold 6254) return underflow with the newer numpy versions.
I'd posted the issue to the mailing list where it was suggested that we should expect a result of 0 and that this may be an issue in the SIMD version.
Thanks for looking- please let me know if there's any additional information I can provide.
Reproduce the code example:
Error message:
NumPy/Python version information:
Numpy: 1.21.4
Python: 3.8.6 (default, Dec 16 2020, 13:45:25) [GCC 10.2.0]
The text was updated successfully, but these errors were encountered: