test cases for both f32 and f64 on asinh(-0.0)

This commit is contained in:
Phosphorus15 2019-08-19 17:29:37 +08:00
parent c4569347b2
commit 64e3a10a82
2 changed files with 2 additions and 0 deletions

View File

@ -1495,6 +1495,7 @@ fn test_asinh() {
assert_eq!(inf.asinh(), inf);
assert_eq!(neg_inf.asinh(), neg_inf);
assert!(nan.asinh().is_nan());
assert!((-0.0f32).asinh().is_sign_negative()); // issue 63271
assert_approx_eq!(2.0f32.asinh(), 1.443635475178810342493276740273105f32);
assert_approx_eq!((-2.0f32).asinh(), -1.443635475178810342493276740273105f32);
}

View File

@ -1441,6 +1441,7 @@ fn test_asinh() {
assert_eq!(inf.asinh(), inf);
assert_eq!(neg_inf.asinh(), neg_inf);
assert!(nan.asinh().is_nan());
assert!((-0.0f64).asinh().is_sign_negative()); // issue 63271
assert_approx_eq!(2.0f64.asinh(), 1.443635475178810342493276740273105f64);
assert_approx_eq!((-2.0f64).asinh(), -1.443635475178810342493276740273105f64);
}