Miri made its floatig-point intrinsics imprecise to reflect that we don't guarantee an exact result, and now we are seeing test failures when bumping the Miri subtree:
2025-02-24T19:16:35.0690558Z thread 'num::int_log::checked_ilog2' panicked at library/coretests/tests/num/int_log.rs:50:5:
2025-02-24T19:16:35.0691376Z assertion `left == right` failed
2025-02-24T19:16:35.0691830Z left: Some(13)
2025-02-24T19:16:35.0692204Z right: Some(12)
2025-02-24T19:16:35.0692798Z
2025-02-24T19:16:35.0692807Z
2025-02-24T19:16:35.0692960Z failures:
2025-02-24T19:16:35.0693335Z num::int_log::checked_ilog2
The failure occurs here:
|
assert_eq!(8192i16.checked_ilog2(), Some((8192f32).log2() as u32)); |
log2 here is the float operation. We even document:
The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next.
So I think the test is bogus?
Cc @saethlin @tgross35
Note that this is somewhat urgent as it blocks updating Miri's subtree.
Miri made its floatig-point intrinsics imprecise to reflect that we don't guarantee an exact result, and now we are seeing test failures when bumping the Miri subtree:
The failure occurs here:
rust/library/coretests/tests/num/int_log.rs
Line 50 in b6a3841
log2here is the float operation. We even document:So I think the test is bogus?
Cc @saethlin @tgross35
Note that this is somewhat urgent as it blocks updating Miri's subtree.