FEAT: logaddexp2 ufunc implementation#174
Merged
SwayamInSync merged 3 commits intonumpy:mainfrom Oct 16, 2025
Merged
Conversation
juntyr
reviewed
Oct 16, 2025
Member
Author
|
Since |
Member
Author
|
Lets take this in, maybe job-14 got stuck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot Summary
This pull request adds full support for the
logaddexp2operation in quad-precision and long double types, including its implementation, exposure as a NumPy ufunc, and comprehensive tests for correctness and special cases. The release tracker is also updated to reflect this new support.Implementation of
logaddexp2operation:quad_logaddexp2for quad-precision (Sleef_quad) andld_logaddexp2for long double, handling all special cases (NaN, infinities, etc.). (quaddtype/numpy_quaddtype/src/ops.hpp) [1]], [2]])Integration with NumPy:
logaddexp2operation as a universal function (ufunc) for both quad and long double types, making it available in the NumPy interface. (quaddtype/numpy_quaddtype/src/umath/binary_ops.cpp) ([quaddtype/numpy_quaddtype/src/umath/binary_ops.cppR246-R248])Testing improvements:
logaddexp2, covering a wide range of values (including edge cases like NaN and infinities), mathematical properties, and its relationship tologaddexp. (quaddtype/tests/test_quaddtype.py) ([quaddtype/tests/test_quaddtype.pyR531-R637])Documentation and tracking:
logaddexp2is now fully supported for both quad and long double types. (quaddtype/release_tracker.md) ([quaddtype/release_tracker.mdL14-R14])