Skip to content

Commit 75c9ee4

Browse files
committed
increase f16 APPROX threshold to 2e-3
1 parent 9714fdd commit 75c9ee4

File tree

1 file changed

+2
-2
lines changed
  • library/coretests/tests/floats

1 file changed

+2
-2
lines changed

library/coretests/tests/floats/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait TestableFloat {
2525

2626
impl TestableFloat for f16 {
2727
type Int = u16;
28-
const APPROX: Self = 1e-3;
28+
const APPROX: Self = 2e-3;
2929
const ZERO: Self = 0.0;
3030
const ONE: Self = 1.0;
3131
const PI: Self = std::f16::consts::PI;
@@ -1422,7 +1422,7 @@ float_test! {
14221422
assert_biteq!((0.0 as Float).to_radians(), 0.0);
14231423
assert_approx_eq!((154.6 as Float).to_radians(), 2.6982790235832334267135442069489767804);
14241424
assert_approx_eq!((-332.31 as Float).to_radians(), -5.7999036373023566567593094812182763013);
1425-
assert_approx_eq!((180.0 as Float).to_radians(), pi, 0.002); // minimal f16 rounding tolerance
1425+
assert_approx_eq!((180.0 as Float).to_radians(), pi);
14261426
assert!(nan.to_radians().is_nan());
14271427
assert_biteq!(inf.to_radians(), inf);
14281428
assert_biteq!(neg_inf.to_radians(), neg_inf);

0 commit comments

Comments
 (0)