-
-
Notifications
You must be signed in to change notification settings - Fork 13
FEAT: degrees and rad2deg ufuncs implementation
#186
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
|
both ufuncs are equivalent |
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.
Pull Request Overview
This pull request implements the degrees and rad2deg ufuncs for converting radians to degrees in quad-precision and long double types. Both functions perform the same mathematical operation but provide alternative API names for consistency with NumPy conventions.
- Added
quad_degreesandld_degreesfunctions that convert radians to degrees using the formularadians * 180 / π - Registered both
degreesandrad2degufuncs in the NumPy extension system - Added comprehensive parameterized tests covering basic conversions, negative values, special values (inf, nan), and edge cases
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| quaddtype/numpy_quaddtype/src/ops.hpp | Implements the core conversion functions for quad-precision and long double types |
| quaddtype/numpy_quaddtype/src/umath/unary_ops.cpp | Registers the new ufuncs with NumPy's universal function system |
| quaddtype/tests/test_quaddtype.py | Adds parameterized tests for both ufuncs with comprehensive test cases |
| quaddtype/release_tracker.md | Updates documentation to mark degrees and rad2deg as implemented |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Merging this in! |
Copilot Summary
This pull request adds support for converting radians to degrees in quad-precision and long double types, implements the corresponding ufuncs (
degreesandrad2deg), and introduces comprehensive tests for these operations. It also updates the release tracker to reflect the new functionality.New quad-precision and long double degree conversion support:
quad_degreesandld_degreesfunctions to convert radians to degrees forSleef_quadandlong doubletypes, respectively (quaddtype/numpy_quaddtype/src/ops.hpp). [1] [2]Ufunc integration:
degreesandrad2degufuncs for quad-precision and long double types in the NumPy extension (quaddtype/numpy_quaddtype/src/umath/unary_ops.cpp).Testing improvements:
degreesandrad2degufuncs, including edge cases and special values (quaddtype/tests/test_quaddtype.py).Documentation and tracking:
degreesandrad2degare now implemented and tested (quaddtype/release_tracker.md).