File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
src/tools/miri/tests/pass Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -539,9 +539,17 @@ fn test_log2() {
539539 let nan: f32 = f32:: NAN ;
540540 let inf: f32 = f32:: INFINITY ;
541541 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+ ) ;
543547 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+ ) ;
545553 assert ! ( nan. log2( ) . is_nan( ) ) ;
546554 assert_eq ! ( inf. log2( ) , inf) ;
547555 assert ! ( neg_inf. log2( ) . is_nan( ) ) ;
@@ -704,5 +712,9 @@ fn test_real_consts() {
704712 assert_approx_eq ! ( log2_e, e. log2( ) ) ;
705713 assert_approx_eq ! ( log10_e, e. log10( ) ) ;
706714 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+ ) ;
708720}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ macro_rules! assert_approx_eq {
5151/// s | 1111 1111 | 0x..x
5252/// ````
5353/// Were at least one `x` is a 1.
54- ///
54+ ///
5555/// This sNaN has the following representation and is used for testing purposes.:
5656/// ```
5757/// 0 | 1111111 | 01..0
You can’t perform that action at this time.
0 commit comments