File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/tools/miri/tests/pass Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1153,18 +1153,18 @@ pub fn libm() {
1153
1153
assert_approx_eq ! ( ( -2.0f64 ) . asinh( ) , -1.443635475178810342493276740273105f64 ) ;
1154
1154
1155
1155
// 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 ;
1161
1161
for _ in 0 ..64 {
1162
1162
// 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( ) ) ;
1165
1165
// 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( ) ) ;
1168
1168
}
1169
1169
1170
1170
assert_eq ! ( 0f32 . cos( ) , 1f32 ) ;
You can’t perform that action at this time.
0 commit comments