You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #138062 - LorrensP-2158466:miri-enable-float-nondet, r=<try>
Enable Non-determinism of float operations in Miri and change std tests
<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
<!-- homu-ignore:end -->
Links to [#4208](rust-lang/miri#4208) and [#3555](rust-lang/miri#3555) in Miri.
Non-determinism of floating point operations was disabled in #137594 because it breaks the tests and doc-tests in core/coretests and std.
This PR:
- enables the float non-determinism but with a lower relative error of 4ULP instead of 16ULP
- changes tests that made incorrect assumptions about the operations not to make that assumption anymore (from `assert_eq!` to `assert_approx_eq!`.
- changes the `assert_approx_eq!` macro to allow up to 1e-4 to make the tests pass
TODO:
- I didn't touch the doc tests because I do not know nearly enough to come near them :)
- probably change the `assert_approx_eq` to use the same technique as Miri (i.e., using ULP instead of EPSILON)
try-job: x86_64-gnu-aux
0 commit comments