Skip to content

Conversation

SwayamInSync
Copy link
Member

Copilot Summary

This pull request adds full support for the floor_divide operation for quad-precision floating-point numbers. It introduces robust implementations for both quad-precision and long double types, registers the new universal function (ufunc) with NumPy, updates documentation to reflect the new support, and adds comprehensive tests covering edge cases and mathematical properties.

Implementation of floor_divide operation:

  • Added quad_floor_divide and ld_floor_divide functions in ops.hpp to correctly handle all special cases (NaN, infinities, signed zeros, etc.) and match NumPy's semantics for floor division with quad-precision and long double types. [1] [2]

Integration with NumPy:

  • Registered the new floor_divide ufunc for quad-precision and long double types in the NumPy extension initialization, making it available as a NumPy operation.

Documentation update:

  • Updated release_tracker.md to mark floor_divide as fully supported for both quad and long double types.

Testing and validation:

  • Added comprehensive parameterized tests in test_quaddtype.py to verify floor_divide correctness across a wide range of input values, including all relevant edge cases and mathematical properties.

Copy link
Contributor

@juntyr juntyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SwayamInSync
Copy link
Member Author

Cool lets merge it then

@SwayamInSync SwayamInSync merged commit db6b84e into numpy:main Oct 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants