diff options
author | Tanner Gooding <tannergooding@users.noreply.github.com> | 2017-03-22 22:44:40 -0700 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2017-03-22 22:44:40 -0700 |
commit | 72c57d9d9fd2d4cd8c96f124d132d316c8ef6013 (patch) | |
tree | 33e4152de6b9e38f575c2e1782cd29f6beb36644 /tests/src | |
parent | ab0fbce6b629d081c1102d353abab0d8febd4487 (diff) | |
download | coreclr-72c57d9d9fd2d4cd8c96f124d132d316c8ef6013.tar.gz coreclr-72c57d9d9fd2d4cd8c96f124d132d316c8ef6013.tar.bz2 coreclr-72c57d9d9fd2d4cd8c96f124d132d316c8ef6013.zip |
Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞). (#10295)
* Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞).
* Fixing up the logic for HAVE_COMPATIBLE_POW in the PAL layer.
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/CoreMangLib/cti/system/math/mathpow.cs | 2 | ||||
-rw-r--r-- | tests/src/CoreMangLib/cti/system/mathf/mathfpow.cs | 2 | ||||
-rw-r--r-- | tests/src/JIT/Directed/intrinsic/pow/pow1.cs | 2 | ||||
-rw-r--r-- | tests/src/JIT/Methodical/NaN/intrinsic.cs | 8 | ||||
-rw-r--r-- | tests/src/JIT/Methodical/NaN/intrinsic_nonf.il | 8 |
5 files changed, 11 insertions, 11 deletions
diff --git a/tests/src/CoreMangLib/cti/system/math/mathpow.cs b/tests/src/CoreMangLib/cti/system/math/mathpow.cs index c9b02c3e9d..10986a8991 100644 --- a/tests/src/CoreMangLib/cti/system/math/mathpow.cs +++ b/tests/src/CoreMangLib/cti/system/math/mathpow.cs @@ -217,7 +217,7 @@ public class MathPow { double d = Math.Pow(- 1, double.NegativeInfinity); - if (!double.IsNaN(d)) + if (d != 1) { TestLibrary.TestFramework.LogError("007.1", "Return value is wrong!"); retVal = false; diff --git a/tests/src/CoreMangLib/cti/system/mathf/mathfpow.cs b/tests/src/CoreMangLib/cti/system/mathf/mathfpow.cs index 22019ac8d8..deac1d8978 100644 --- a/tests/src/CoreMangLib/cti/system/mathf/mathfpow.cs +++ b/tests/src/CoreMangLib/cti/system/mathf/mathfpow.cs @@ -216,7 +216,7 @@ public class MathFPow { float f = MathF.Pow(-1, float.NegativeInfinity); - if (!float.IsNaN(f)) + if (f != 1) { TestLibrary.TestFramework.LogError("007.1", "Return value is wrong!"); retVal = false; diff --git a/tests/src/JIT/Directed/intrinsic/pow/pow1.cs b/tests/src/JIT/Directed/intrinsic/pow/pow1.cs index dc6e1a1b83..6f2921d78f 100644 --- a/tests/src/JIT/Directed/intrinsic/pow/pow1.cs +++ b/tests/src/JIT/Directed/intrinsic/pow/pow1.cs @@ -129,7 +129,7 @@ internal class pow1 x = 1; y = Double.NaN; z = Math.Pow(x, y); - if (!Double.IsNaN(z)) + if (z != 1) { Console.WriteLine("x: {0}, y: {1}, Pow(x,y): {2}", x, y, z); pass = false; diff --git a/tests/src/JIT/Methodical/NaN/intrinsic.cs b/tests/src/JIT/Methodical/NaN/intrinsic.cs index 86020d8988..f6a97e5b93 100644 --- a/tests/src/JIT/Methodical/NaN/intrinsic.cs +++ b/tests/src/JIT/Methodical/NaN/intrinsic.cs @@ -582,11 +582,11 @@ namespace JitTest TestAtan2(Double.NaN, Double.PositiveInfinity, Double.NaN); TestAtan2(Double.NaN, Double.NegativeInfinity, Double.NaN); TestAtan2(Double.PositiveInfinity, Double.NaN, Double.NaN); - TestAtan2(Double.PositiveInfinity, Double.PositiveInfinity, Double.NaN); - TestAtan2(Double.PositiveInfinity, Double.NegativeInfinity, Double.NaN); + TestAtan2(Double.PositiveInfinity, Double.PositiveInfinity, Math.PI / 4); + TestAtan2(Double.PositiveInfinity, Double.NegativeInfinity, 3 * Math.PI / 4); TestAtan2(Double.NegativeInfinity, Double.NaN, Double.NaN); - TestAtan2(Double.NegativeInfinity, Double.PositiveInfinity, Double.NaN); - TestAtan2(Double.NegativeInfinity, Double.NegativeInfinity, Double.NaN); + TestAtan2(Double.NegativeInfinity, Double.PositiveInfinity, -Math.PI / 4); + TestAtan2(Double.NegativeInfinity, Double.NegativeInfinity, -3 * Math.PI / 4); } catch (Exception ex) { diff --git a/tests/src/JIT/Methodical/NaN/intrinsic_nonf.il b/tests/src/JIT/Methodical/NaN/intrinsic_nonf.il index ef9bc0af31..9c9faa76dd 100644 --- a/tests/src/JIT/Methodical/NaN/intrinsic_nonf.il +++ b/tests/src/JIT/Methodical/NaN/intrinsic_nonf.il @@ -2846,13 +2846,13 @@ float64) IL_0783: ldc.r8 (00 00 00 00 00 00 F0 7F) IL_078c: ldc.r8 (00 00 00 00 00 00 F0 7F) - IL_0795: ldc.r8 (FF FF FF FF FF FF FF 7F) + IL_0795: ldc.r8 0.78539816339744828 IL_079e: call void JitTest.Test::TestAtan2(float64, float64, float64) IL_07a3: ldc.r8 (00 00 00 00 00 00 F0 7F) IL_07ac: ldc.r8 (00 00 00 00 00 00 F0 FF) - IL_07b5: ldc.r8 (FF FF FF FF FF FF FF 7F) + IL_07b5: ldc.r8 2.3561944901923448 IL_07be: call void JitTest.Test::TestAtan2(float64, float64, float64) @@ -2864,13 +2864,13 @@ float64) IL_07e3: ldc.r8 (00 00 00 00 00 00 F0 FF) IL_07ec: ldc.r8 (00 00 00 00 00 00 F0 7F) - IL_07f5: ldc.r8 (FF FF FF FF FF FF FF 7F) + IL_07f5: ldc.r8 -0.78539816339744828 IL_07fe: call void JitTest.Test::TestAtan2(float64, float64, float64) IL_0803: ldc.r8 (00 00 00 00 00 00 F0 FF) IL_080c: ldc.r8 (00 00 00 00 00 00 F0 FF) - IL_0815: ldc.r8 (FF FF FF FF FF FF FF 7F) + IL_0815: ldc.r8 -2.3561944901923448 IL_081e: call void JitTest.Test::TestAtan2(float64, float64, float64) |