File tree 2 files changed +16
-4
lines changed
src/tools/miri/tests/pass 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -539,9 +539,17 @@ fn test_log2() {
539
539
let nan: f32 = f32:: NAN ;
540
540
let inf: f32 = f32:: INFINITY ;
541
541
let neg_inf: f32 = f32:: NEG_INFINITY ;
542
- assert_approx_eq ! ( 10.0f32 . log2( ) , 3.321928 , APPROX_DELTA ) ;
542
+ assert_approx_eq ! (
543
+ 10.0f32 . log2( ) ,
544
+ 3.321928 ,
545
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
546
+ ) ;
543
547
assert_approx_eq ! ( 2.3f32 . log2( ) , 1.201634 ) ;
544
- assert_approx_eq ! ( 1.0f32 . exp( ) . log2( ) , 1.442695 , APPROX_DELTA ) ;
548
+ assert_approx_eq ! (
549
+ 1.0f32 . exp( ) . log2( ) ,
550
+ 1.442695 ,
551
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
552
+ ) ;
545
553
assert ! ( nan. log2( ) . is_nan( ) ) ;
546
554
assert_eq ! ( inf. log2( ) , inf) ;
547
555
assert ! ( neg_inf. log2( ) . is_nan( ) ) ;
@@ -704,5 +712,9 @@ fn test_real_consts() {
704
712
assert_approx_eq ! ( log2_e, e. log2( ) ) ;
705
713
assert_approx_eq ! ( log10_e, e. log10( ) ) ;
706
714
assert_approx_eq ! ( ln_2, 2f32 . ln( ) ) ;
707
- assert_approx_eq ! ( ln_10, 10f32 . ln( ) , APPROX_DELTA ) ;
715
+ assert_approx_eq ! (
716
+ ln_10,
717
+ 10f32 . ln( ) ,
718
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
719
+ ) ;
708
720
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ macro_rules! assert_approx_eq {
51
51
/// s | 1111 1111 | 0x..x
52
52
/// ````
53
53
/// Were at least one `x` is a 1.
54
- ///
54
+ ///
55
55
/// This sNaN has the following representation and is used for testing purposes.:
56
56
/// ```
57
57
/// 0 | 1111111 | 01..0
You can’t perform that action at this time.
0 commit comments