Skip to content

Commit 3008073

Browse files
committed
fix cosh test and some comments
1 parent 01a0a3a commit 3008073

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tools/miri/tests/pass/float.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,15 +1139,14 @@ pub fn libm() {
11391139
assert_approx_eq!((f64::consts::PI / 2f64).sin(), 1f64);
11401140
assert_approx_eq!(f32::consts::FRAC_PI_6.sin(), 0.5);
11411141
assert_approx_eq!(f64::consts::FRAC_PI_6.sin(), 0.5);
1142-
// Increase error tolerance from 12ULP to 16ULP because of the extra operation.
1142+
// Increase error tolerance to 16ULP because of the extra operation.
11431143
assert_approx_eq!(f32::consts::FRAC_PI_4.sin().asin(), f32::consts::FRAC_PI_4, 16);
11441144
assert_approx_eq!(f64::consts::FRAC_PI_4.sin().asin(), f64::consts::FRAC_PI_4, 16);
11451145
assert_biteq(0.0f32.asin(), 0.0f32, "asin(+0) = +0");
11461146
assert_biteq((-0.0f32).asin(), -0.0, "asin(-0) = -0");
11471147
assert_biteq(0.0f64.asin(), 0.0, "asin(+0) = +0");
11481148
assert_biteq((-0.0f64).asin(), -0.0, "asin(-0) = -0");
11491149

1150-
11511150
assert_approx_eq!(1.0f32.sinh(), 1.1752012f32);
11521151
assert_approx_eq!(1.0f64.sinh(), 1.1752011936438014f64);
11531152
assert_approx_eq!(2.0f32.asinh(), 1.443635475178810342493276740273105f32);
@@ -1173,13 +1172,13 @@ pub fn libm() {
11731172
assert_approx_eq!((f64::consts::PI * 2f64).cos(), 1f64);
11741173
assert_approx_eq!(f32::consts::FRAC_PI_3.cos(), 0.5);
11751174
assert_approx_eq!(f64::consts::FRAC_PI_3.cos(), 0.5);
1176-
// Increase error tolerance from 12ULP to 16ULP because of the extra operation.
1175+
// Increase error tolerance to 16ULP because of the extra operation.
11771176
assert_approx_eq!(f32::consts::FRAC_PI_4.cos().acos(), f32::consts::FRAC_PI_4, 16);
11781177
assert_approx_eq!(f64::consts::FRAC_PI_4.cos().acos(), f64::consts::FRAC_PI_4, 16);
11791178
assert_biteq(1.0f32.acos(), 0.0, "acos(1) = 0");
11801179
assert_biteq(1.0f64.acos(), 0.0, "acos(1) = 0");
11811180

1182-
assert_approx_eq!(1.0f32.cosh(), 1.54308f32);
1181+
assert_approx_eq!(1.0f32.cosh(), 1.5430806f32);
11831182
assert_approx_eq!(1.0f64.cosh(), 1.5430806348152437f64);
11841183
assert_eq!(0.0f32.cosh(), 1.0);
11851184
assert_eq!(0.0f64.cosh(), 1.0);

0 commit comments

Comments
 (0)