changeset 15782:c2c2e05afe5c

Merge
author dlong
date Tue, 27 Sep 2016 21:14:47 -0400
parents 2ac37e4cbc91 a1f77096eb86
children 53130f5fbb5e
files
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Math.java	Fri Sep 23 13:44:03 2016 -0700
+++ b/src/java.base/share/classes/java/lang/Math.java	Tue Sep 27 21:14:47 2016 -0400
@@ -1626,7 +1626,7 @@
      *
      * @since 9
      */
-    // @HotSpotIntrinsicCandidate
+    @HotSpotIntrinsicCandidate
     public static double fma(double a, double b, double c) {
         /*
          * Infinity and NaN arithmetic is not quite the same with two
@@ -1743,7 +1743,7 @@
      *
      * @since 9
      */
-    // @HotSpotIntrinsicCandidate
+    @HotSpotIntrinsicCandidate
     public static float fma(float a, float b, float c) {
         /*
          *  Since the double format has more than twice the precision
--- a/test/java/lang/Math/FusedMultiplyAddTests.java	Fri Sep 23 13:44:03 2016 -0700
+++ b/test/java/lang/Math/FusedMultiplyAddTests.java	Tue Sep 27 21:14:47 2016 -0400
@@ -221,6 +221,9 @@
 
             {Double.MIN_VALUE, -0.0, +0.0,
              +0.0},
+
+            {1.0+Math.ulp(1.0), 1.0+Math.ulp(1.0), -1.0-2.0*Math.ulp(1.0),
+             Math.ulp(1.0)*Math.ulp(1.0)},
         };
 
         for (double[] testCase: testCases)
@@ -344,6 +347,9 @@
 
             {Float.MAX_VALUE, 2.0f, 1.0f,
              InfinityF},
+
+            {1.0f+Math.ulp(1.0f), 1.0f+Math.ulp(1.0f), -1.0f-2.0f*Math.ulp(1.0f),
+             Math.ulp(1.0f)*Math.ulp(1.0f)},
         };
 
         for (float[] testCase: testCases)