np.exp does not return inf on overflow in fast math mode
See original GitHub issueFor example, np.exp(100)
will return 100
while it should return inf.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Why does NumPy.exp show a different result than exp in C
The exp function in C normally doesn't take complex numbers. And how are you examining the result, anyway? Show us runnable code. –...
Read more >How to Fix: RuntimeWarning: Overflow encountered in exp
In this article we will discuss how to fix RuntimeWarning: overflow encountered in exp in Python. This warning occurs while using the NumPy...
Read more >What Every Computer Scientist Should Know About Floating ...
Builders of computer systems often need information about floating-point arithmetic. ... Floating-point representations are not necessarily unique.
Read more >Mathematics - Julia Documentation
When x and y are arrays, if norm(x-y) is not finite (i.e. ±Inf or NaN ), the comparison falls back to checking whether...
Read more >Cython for NumPy users
That is, it doesn't take your full program and “turn it into C” – rather, the result makes full use of the Python...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was fixed as part of a recent Jaxlib update (0.1.13). Let us know if you see more problems.
Note you can work around by setting the environment variable
XLA_FLAGS=--xla_cpu_enable_fast_math=false
.