-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-120950: Fix overflow in math.log() with large int-like argument #121011
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
base: main
Are you sure you want to change the base?
gh-120950: Fix overflow in math.log() with large int-like argument #121011
Conversation
Handling of arbitrary large int-like argument is now consistent with handling arbitrary large int arguments.
This is not optimal, because for large int-like argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this pr has conflicts (which seems to be easy to fix, however).
Lets merge this; it has approval from Mark. LGTM with one cleanup, as _PyLong_Frexp() now not raises.
Modules/mathmodule.c
Outdated
if (x == -1.0 && PyErr_Occurred()) | ||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (x == -1.0 && PyErr_Occurred()) | |
return NULL; |
Now _PyLong_Frexp() not raises.
Handling of arbitrary large int-like argument is now consistent with handling arbitrary large int arguments.