Fix i_to_f test - #1324
Merged
Merged
Fix i_to_f test#1324
i_to_f test#1324Conversation
beetrees
force-pushed
the
fix-i-to-f-test
branch
2 times, most recently
from
September 22, 2026 17:35
9965ec2 to
c345777
Compare
Contributor
Author
|
Test failures appear unrelated |
tgross35
approved these changes
Sep 25, 2026
When casting from `fN` to `iX`, `fN::{,NEG_}INFINITY` always saturates to to `[iu]X::{MAX,MIN}`, which can sometimes be further away from the original integer that was casted to `fN` than the next closest value to zero, `fN::{MAX,MIN}`. This PR fixes the test by manually calculating the integer value that is 1 ULP above/below `fN::{MAX,MIN}`, therefore allowing the test to pass in this case.
beetrees
force-pushed
the
fix-i-to-f-test
branch
from
September 29, 2026 10:16
c345777 to
37173be
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
beetrees
enabled auto-merge (rebase)
September 29, 2026 10:51
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.
When casting from
fNtoiX,fN::{,NEG_}INFINITYalways saturates to to[iu]X::{MAX,MIN}, which can sometimes be further away from the original integer that was casted tofNthan the next closest value to zero,fN::{MAX,MIN}. This PR fixes the test by manually calculating the integer value that is 1 ULP above/belowfN::{MAX,MIN}, therefore allowing the test to pass in this case.cc #729
r? @tgross35