-
-
Notifications
You must be signed in to change notification settings - Fork 13
FEAT: ldexp ufunc implementation
#195
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
|
I need to fix this, it seems the int is causing issue here |
|
great so indeed the issue was in the different system size of int. Let me clean the code and see if I can generalize it better |
|
one more thing to note is that on these systems long double is 128 bit hence Sleef_quad is also getting mapped to long double |
|
@juntyr ready for review now |
juntyr
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.
LGTM, with the nit addressed
Co-authored-by: Juniper Tyree <50025784+juntyr@users.noreply.github.com>
|
@SwayamInSync Ok, feel free to merge once CI is green |
|
Merging this! |
Copilot Summary
This pull request adds full support for the
ldexpfunction (computingx * 2**exp) for quad precision types in the codebase. It introduces the mixed-type operation for quad and integer types, integrates the operation as a NumPy ufunc, and provides comprehensive tests to ensure correctness and edge case handling. The release tracker is updated to reflect this new support.Quad precision
ldexpimplementation:quad_ldexpandld_ldexpfor quad and long double types, including proper handling of NaN, zero, and infinity cases inops.hpp.NumPy ufunc integration:
ldexpufunc, and registered the ufunc with proper type promotion inbinary_ops.cpp.ldexpufunc ininit_quad_binary_ops, making it available for use.Testing and documentation:
ldexpfunction, covering basic functionality, zero, infinity, NaN, overflow, and underflow cases intest_quaddtype.py.ldexpas implemented and tested for quad precision.