From 64e3a10a82e6abad20f4a56750dac4cdd5df19ab Mon Sep 17 00:00:00 2001 From: Phosphorus15 Date: Mon, 19 Aug 2019 17:29:37 +0800 Subject: [PATCH] test cases for both `f32` and `f64` on asinh(-0.0) --- src/libstd/f32.rs | 1 + src/libstd/f64.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 653108cbece..ba75650fc4c 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -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); } diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index e5f963d8736..62c659739de 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -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); }