Repository navigation
Conversation
The CPU rectangle expansion rounded exact ties up and turned NaN into infinity. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #245. In the CPU rectangle expansion,
f32_to_halfrounded exact ties up in the normal range and turned NaN into infinity. Ties now go to the even mantissa, as the subnormal path already does, and NaN becomes a quiet NaN with the same sign (the payload is not kept).Tested (2119b0e + this change; GTX 1650 SUPER, Windows 11, Rust 1.98.1 gnullvm):
expand_rectsand covers a tie rounding down, a tie rounding up, NaN and ±infinity. It fails without the fix; the NaN check also fails when only the NaN fix is removed.cargo test --workspace --locked --no-fail-fast: 496 passed, 1 failed, 7 ignored. The failure isload_probe: building its fixture fails to link on gnullvm (/DELAYLOAD); this PR does not touch it.--all-targets -D warnings) passes, andrustfmt --checkpasses on the changed file.Not tested: MSVC build, the all-features Clippy run, running a game.
AI use: written and tested with Claude Code.
🤖 Generated with Claude Code