-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Change std f32 test to pass under Miri #146051
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
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
r? @RalfJung |
assert_approx_eq!(10.0f32.log(10.0), 1.0); | ||
assert_approx_eq!(2.3f32.log(3.5), 0.664858); | ||
assert_approx_eq!(10.0f32.log(10.0), 1.0, APPROX_DELTA); | ||
assert_approx_eq!(2.3f32.log(3.5), 0.664858, APPROX_DELTA); |
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.
If 10.log(10)
fails, then this one will fail eventually, so I used APPROX_DELTA here as well.
Thanks! |
…r=RalfJung Change std f32 test to pass under Miri Adds `APPROX_DELTA` to 2 tests of `f32::log` reported in [#miri > Miri test-libstd Failure (2025-08)](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-08.29). I changed 2 lines, the first one is the actual failure. The second one is precautionary.
Rollup of 6 pull requests Successful merges: - #145421 (`dump_mir` cleanups) - #145968 (Add `Bound::copied`) - #146004 (resolve: Refactor `struct ExternPreludeEntry`) - #146042 (Detect negative literal inferred to unsigned integer) - #146046 (Suggest method name with maybe ty mismatch) - #146051 (Change std f32 test to pass under Miri) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146051 - LorrensP-2158466:miri-libstd-fix, r=RalfJung Change std f32 test to pass under Miri Adds `APPROX_DELTA` to 2 tests of `f32::log` reported in [#miri > Miri test-libstd Failure (2025-08)](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-08.29). I changed 2 lines, the first one is the actual failure. The second one is precautionary.
Adds
APPROX_DELTA
to 2 tests off32::log
reported in #miri > Miri test-libstd Failure (2025-08).I changed 2 lines, the first one is the actual failure. The second one is precautionary.