--- old/test/java/lang/Math/HypotTests.java 2014-08-15 13:26:13.000000000 +0800 +++ new/test/java/lang/Math/HypotTests.java 2014-08-15 13:26:13.000000000 +0800 @@ -25,10 +25,13 @@ * @test * @bug 4851638 4939441 * @summary Tests for {Math, StrictMath}.hypot + * @library /lib/testlibrary + * @build jdk.testlibrary.DoubleUtils jdk.testlibrary.FloatUtils + * @run main HypotTests * @author Joseph D. Darcy */ -import sun.misc.DoubleConsts; +import static jdk.testlibrary.DoubleUtils.*; public class HypotTests { private HypotTests(){} @@ -86,8 +89,8 @@ // Verify hypot(x, 0.0) is close to x over the entire exponent // range. - for(int i = DoubleConsts.MIN_SUB_EXPONENT; - i <= DoubleConsts.MAX_EXPONENT; + for(int i = MIN_SUB_EXPONENT; + i <= Double.MAX_EXPONENT; i++) { double input = Math.scalb(2, i); failures += testHypotCase(input, 0.0, input); @@ -125,7 +128,7 @@ for(int i = 0; i < 1000; i++) { double d = rand.nextDouble(); // Scale d to have an exponent equal to MAX_EXPONENT -15 - d = Math.scalb(d, DoubleConsts.MAX_EXPONENT + d = Math.scalb(d, Double.MAX_EXPONENT -15 - Tests.ilogb(d)); for(int j = 0; j <= 13; j += 1) { failures += testHypotCase(3*d, 4*d, 5*d, 2.5);