FEAT: logaddexp2 ufunc implementation #174
Merged
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
logaddexp2
operation 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
logaddexp2
operation:quad_logaddexp2
for quad-precision (Sleef_quad
) andld_logaddexp2
for long double, handling all special cases (NaN, infinities, etc.). (quaddtype/numpy_quaddtype/src/ops.hpp
) [1]], [2]])Integration with NumPy:
logaddexp2
operation 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:
logaddexp2
is now fully supported for both quad and long double types. (quaddtype/release_tracker.md
) ([quaddtype/release_tracker.mdL14-R14])