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.
This commit is contained in:
commit
0dbd8e68b1
1 changed files with 2 additions and 2 deletions
|
|
@ -79,8 +79,8 @@ fn test_log() {
|
|||
let nan: f32 = f32::NAN;
|
||||
let inf: f32 = f32::INFINITY;
|
||||
let neg_inf: f32 = f32::NEG_INFINITY;
|
||||
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);
|
||||
assert_approx_eq!(1.0f32.exp().log(1.0f32.exp()), 1.0, APPROX_DELTA);
|
||||
assert!(1.0f32.log(1.0).is_nan());
|
||||
assert!(1.0f32.log(-13.9).is_nan());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue