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
Fixed OverflowError in plot #20939
Fixed OverflowError in plot #20939
Conversation
✅ Hi, I am the SymPy bot (v161). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.8. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
Reopening the PR due to some bug in the doctests which caused them to fail earlier (Issue #20955). |
I think this looks reasonable. @sylee957 does it look okay to you? |
Changes
Added handling for
OverflowError
caused while plotting expressions involvingexp(1/x)
.The Bug
Resolution
During the sampling of the expression
exp(1/x)
, a very large value is encountered which causes it to crash inOverflowError
. This error is (kind of) similar to theZeroDivisionError
because in both the cases, the resultant value is arbitrarily large (at least for the computer), and so we handle it just like theZeroDivisionError
(that has already been implemented).Release Notes
OverflowError
(when plotting functions likeexp(1/x)
).