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 @@ -572,9 +572,17 @@ fn test_log2() {
572
572
let nan: f32 = f32:: NAN ;
573
573
let inf: f32 = f32:: INFINITY ;
574
574
let neg_inf: f32 = f32:: NEG_INFINITY ;
575
- assert_approx_eq ! ( 10.0f32 . log2( ) , 3.321928 , APPROX_DELTA ) ;
575
+ assert_approx_eq ! (
576
+ 10.0f32 . log2( ) ,
577
+ 3.321928 ,
578
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
579
+ ) ;
576
580
assert_approx_eq ! ( 2.3f32 . log2( ) , 1.201634 ) ;
577
- assert_approx_eq ! ( 1.0f32 . exp( ) . log2( ) , 1.442695 , APPROX_DELTA ) ;
581
+ assert_approx_eq ! (
582
+ 1.0f32 . exp( ) . log2( ) ,
583
+ 1.442695 ,
584
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
585
+ ) ;
578
586
assert ! ( nan. log2( ) . is_nan( ) ) ;
579
587
assert_eq ! ( inf. log2( ) , inf) ;
580
588
assert ! ( neg_inf. log2( ) . is_nan( ) ) ;
@@ -767,7 +775,11 @@ fn test_real_consts() {
767
775
assert_approx_eq ! ( log2_e, e. log2( ) ) ;
768
776
assert_approx_eq ! ( log10_e, e. log10( ) ) ;
769
777
assert_approx_eq ! ( ln_2, 2f32 . ln( ) ) ;
770
- assert_approx_eq ! ( ln_10, 10f32 . ln( ) , APPROX_DELTA ) ;
778
+ assert_approx_eq ! (
779
+ ln_10,
780
+ 10f32 . ln( ) ,
781
+ APPROX_DELTA /* Miri float-non-det: Make tests pass for now */
782
+ ) ;
771
783
}
772
784
773
785
#[ test]
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ macro_rules! assert_approx_eq {
50
50
/// s | 1111 1111 | 0x..x
51
51
/// ````
52
52
/// Were at least one `x` is a 1.
53
- ///
53
+ ///
54
54
/// This sNaN has the following representation and is used for testing purposes.:
55
55
/// ```
56
56
/// 0 | 1111111 | 01..0
You can’t perform that action at this time.
0 commit comments