Skip to content

Commit 998f16c

Browse files
correct terminology for floats
1 parent eeca284 commit 998f16c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,18 +1153,18 @@ pub fn libm() {
11531153
assert_approx_eq!((-2.0f64).asinh(), -1.443635475178810342493276740273105f64);
11541154

11551155
// Ensure `sin` always returns something that is a valid input for `asin`, and same for
1156-
// `cos` and `acos`
1157-
let halve_pi_single = std::f32::consts::FRAC_PI_2;
1158-
let halve_pi_double = std::f64::consts::FRAC_PI_2;
1159-
let pi_single = std::f32::consts::PI;
1160-
let pi_double = std::f64::consts::PI;
1156+
// `cos` and `acos`.
1157+
let halve_pi_f32 = std::f32::consts::FRAC_PI_2;
1158+
let halve_pi_f64 = std::f64::consts::FRAC_PI_2;
1159+
let pi_f32 = std::f32::consts::PI;
1160+
let pi_f64 = std::f64::consts::PI;
11611161
for _ in 0..64 {
11621162
// sin() should be clamped to [-1, 1] so asin() can never return NaN
1163-
assert!(!halve_pi_single.sin().asin().is_nan());
1164-
assert!(!halve_pi_double.sin().asin().is_nan());
1163+
assert!(!halve_pi_f32.sin().asin().is_nan());
1164+
assert!(!halve_pi_f64.sin().asin().is_nan());
11651165
// cos() should be clamped to [-1, 1] so acos() can never return NaN
1166-
assert!(!pi_single.cos().acos().is_nan());
1167-
assert!(!pi_double.cos().acos().is_nan());
1166+
assert!(!pi_f32.cos().acos().is_nan());
1167+
assert!(!pi_f64.cos().acos().is_nan());
11681168
}
11691169

11701170
assert_eq!(0f32.cos(), 1f32);

0 commit comments

Comments
 (0)