@@ -193,13 +193,13 @@ fn test_atanh() {
193
193
#[ test]
194
194
fn test_gamma ( ) {
195
195
// precision can differ between platforms
196
- assert_approx_eq ! ( 1.0f32 . gamma( ) , 1.0f32 ) ;
197
- assert_approx_eq ! ( 2.0f32 . gamma( ) , 1.0f32 ) ;
198
- assert_approx_eq ! ( 3.0f32 . gamma( ) , 2.0f32 ) ;
196
+ assert_approx_eq ! ( 1.0f32 . gamma( ) , 1.0f32 , APPROX_DELTA ) ;
197
+ assert_approx_eq ! ( 2.0f32 . gamma( ) , 1.0f32 , APPROX_DELTA ) ;
198
+ assert_approx_eq ! ( 3.0f32 . gamma( ) , 2.0f32 , APPROX_DELTA ) ;
199
199
assert_approx_eq ! ( 4.0f32 . gamma( ) , 6.0f32 , APPROX_DELTA ) ;
200
200
assert_approx_eq ! ( 5.0f32 . gamma( ) , 24.0f32 , APPROX_DELTA ) ;
201
- assert_approx_eq ! ( 0.5f32 . gamma( ) , consts:: PI . sqrt( ) ) ;
202
- assert_approx_eq ! ( ( -0.5f32 ) . gamma( ) , -2.0 * consts:: PI . sqrt( ) ) ;
201
+ assert_approx_eq ! ( 0.5f32 . gamma( ) , consts:: PI . sqrt( ) , APPROX_DELTA ) ;
202
+ assert_approx_eq ! ( ( -0.5f32 ) . gamma( ) , -2.0 * consts:: PI . sqrt( ) , APPROX_DELTA ) ;
203
203
assert_eq ! ( 0.0f32 . gamma( ) , f32 :: INFINITY ) ;
204
204
assert_eq ! ( ( -0.0f32 ) . gamma( ) , f32 :: NEG_INFINITY ) ;
205
205
assert ! ( ( -1.0f32 ) . gamma( ) . is_nan( ) ) ;
0 commit comments