File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ fn test_log() {
7979 let nan: f32 = f32:: NAN ;
8080 let inf: f32 = f32:: INFINITY ;
8181 let neg_inf: f32 = f32:: NEG_INFINITY ;
82- assert_approx_eq ! ( 10.0f32 . log( 10.0 ) , 1.0 ) ;
82+ assert_approx_eq ! ( 10.0f32 . log( 10.0 ) , 1.0 , APPROX_DELTA ) ;
8383 assert_approx_eq ! ( 2.3f32 . log( 3.5 ) , 0.664858 ) ;
8484 assert_approx_eq ! ( 1.0f32 . exp( ) . log( 1.0f32 . exp( ) ) , 1.0 , APPROX_DELTA ) ;
8585 assert ! ( 1.0f32 . log( 1.0 ) . is_nan( ) ) ;
@@ -218,7 +218,7 @@ fn test_ln_gamma() {
218218 assert_eq ! ( 2.0f32 . ln_gamma( ) . 1 , 1 ) ;
219219 assert_approx_eq ! ( 3.0f32 . ln_gamma( ) . 0 , 2.0f32 . ln( ) ) ;
220220 assert_eq ! ( 3.0f32 . ln_gamma( ) . 1 , 1 ) ;
221- assert_approx_eq ! ( ( -0.5f32 ) . ln_gamma( ) . 0 , ( 2.0 * consts:: PI . sqrt( ) ) . ln( ) ) ;
221+ assert_approx_eq ! ( ( -0.5f32 ) . ln_gamma( ) . 0 , ( 2.0 * consts:: PI . sqrt( ) ) . ln( ) , APPROX_DELTA ) ;
222222 assert_eq ! ( ( -0.5f32 ) . ln_gamma( ) . 1 , -1 ) ;
223223}
224224
You can’t perform that action at this time.
0 commit comments