Closed
Description
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:
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?
Note that this is somewhat urgent as it blocks updating Miri's subtree.