Skip to content

Forward-merge release/26.12 into main - #25300

Merged
GPUtester merged 1 commit into
mainfrom
release/26.12
Nov 15, 2026
Merged

GPUtester merged 1 commit into
mainfrom
release/26.12

Conversation

@rapids-bot

@rapids-bot rapids-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Forward-merge triggered by push to release/26.12 that creates a PR to keep main up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.

…4947)

Fix floating-point Python-style modulo (`PyMod`) returning `NaN` for positive infinite divisors (#24898) and returning zero for large negative divisors (#24895).

Previously, `fmod(fmod(x, y) + y, y)` was used. For infinite divisors, `fmod(x, inf)` returned `x`, but `x + inf` became `inf`, leading to `fmod(inf, inf) = NaN`. For large finite negative divisors like `-1e18`, float precision limits caused `fmod(x, y) + y` to round to `y`, resulting in `fmod(y, y) = -0.0`.

This aligns floating-point `PyMod` across operator templates and test utilities with Python/NumPy semantics: compute `fmod(x, y)`, adjust when signs differ (`mod += y`), and preserve the divisor sign on zero with `copysign`. Added C++ unit tests in `operator_parity_test.cpp` and Python tests in `test_binops.py`.

Closes #24898
Closes #24895

Authors:
  - Sai krishna Bodapati (https://github.com/bodapatisaikrishna)
  - Muhammad Haseeb (https://github.com/mhaseeb123)
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Muhammad Haseeb (https://github.com/mhaseeb123)
  - Lawrence Mitchell (https://github.com/wence-)

URL: #24947
@rapids-bot
rapids-bot Bot requested review from a team as code owners November 15, 2026 14:18
@GPUtester
GPUtester merged commit a5045fd into main Nov 15, 2026
13 checks passed
@rapids-bot

rapids-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

SUCCESS - forward-merge complete.

@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. labels Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants