-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-140443: Use fma in loghelper to improve accuracy of log for very large integers
#140469
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
Conversation
4457f4e to
de6ba0d
Compare
Misc/NEWS.d/next/Core_and_Builtins/2025-10-22-23-26-37.gh-issue-140443.wT5i1A.rst
Outdated
Show resolved
Hide resolved
|
Please add your name to |
de6ba0d to
33acf47
Compare
Misc/NEWS.d/next/Core_and_Builtins/2025-10-22-23-26-37.gh-issue-140443.wT5i1A.rst
Outdated
Show resolved
Hide resolved
33acf47 to
760614c
Compare
…ery large integers
Replaced the expression computing the final result in loghelper with an
fma() call:
result = fma(func(2.0), (double)e, func(x));
This change reduces rounding error and improves the ULP distribution of
math.log10() for very large integer inputs.
760614c to
f05b4b2
Compare
tim-one
left a comment
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.
It's been a joy! Thank you for your efforts and patience. It's amazing how much "busy work" there is to make a 1-line change 🤣, eh?
It all looks good to me. I'll merge it tomorrow. Perhaps @StanFromIreland knows more than me about what kind of markup decorations are wanted in NEWS entries. I can never remember that stuff
|
Thank you, @tim-one and @StanFromIreland, for your guidance throughout this PR (and thank you for pointing out my mistakes.) I’ve learned a great deal from your feedback and reviews. |
Misc/NEWS.d/next/Core_and_Builtins/2025-10-22-23-26-37.gh-issue-140443.wT5i1A.rst
Outdated
Show resolved
Hide resolved
…e-140443.wT5i1A.rst Co-authored-by: Stan Ulbrych <[email protected]>
Replaced the expression computing the final result in loghelper with an fma() call:
This change reduces rounding error and improves the ULP distribution of math.log for very large integer inputs.