--- old/test/sun/misc/FloatingDecimal/OldFloatingDecimalForTest.java 2014-08-19 20:24:14.000000000 +0800 +++ new/test/sun/misc/FloatingDecimal/OldFloatingDecimalForTest.java 2014-08-19 20:24:14.000000000 +0800 @@ -23,8 +23,6 @@ //package sun.misc; -import sun.misc.DoubleConsts; -import sun.misc.FloatConsts; import java.util.regex.*; public class OldFloatingDecimalForTest{ @@ -2217,12 +2215,12 @@ // Check for overflow and update exponent accordingly. - if (exponent > DoubleConsts.MAX_EXPONENT) { // Infinite result + if (exponent > Double.MAX_EXPONENT) { // Infinite result // overflow to properly signed infinity return new OldFloatingDecimalForTest(sign * Double.POSITIVE_INFINITY); } else { // Finite return value - if (exponent <= DoubleConsts.MAX_EXPONENT && // (Usually) normal result - exponent >= DoubleConsts.MIN_EXPONENT) { + if (exponent <= Double.MAX_EXPONENT && // (Usually) normal result + exponent >= Double.MIN_EXPONENT) { // The result returned in this block cannot be a // zero or subnormal; however after the @@ -2236,15 +2234,15 @@ // Double.MAX_VALUE overflowing to infinity. significand = (( (exponent + - (long)DoubleConsts.EXP_BIAS) << - (DoubleConsts.SIGNIFICAND_WIDTH-1)) - & DoubleConsts.EXP_BIT_MASK) | - (DoubleConsts.SIGNIF_BIT_MASK & significand); + (long)DoubleUtils.EXP_BIAS) << + (DoubleUtils.SIGNIFICAND_WIDTH-1)) + & DoubleUtils.EXP_BIT_MASK) | + (DoubleUtils.SIGNIF_BIT_MASK & significand); } else { // Subnormal or zero - // (exponent < DoubleConsts.MIN_EXPONENT) + // (exponent < Double.MIN_EXPONENT) - if (exponent < (DoubleConsts.MIN_SUB_EXPONENT -1 )) { + if (exponent < (DoubleUtils.MIN_SUB_EXPONENT -1 )) { // No way to round back to nonzero value // regardless of significand if the exponent is // less than -1075. @@ -2266,7 +2264,7 @@ // -1023 +1074 + 1 = 52 int bitsDiscarded = 53 - - ((int)exponent - DoubleConsts.MIN_SUB_EXPONENT + 1); + ((int)exponent - DoubleUtils.MIN_SUB_EXPONENT + 1); assert bitsDiscarded >= 1 && bitsDiscarded <= 53; // What to do here: @@ -2282,11 +2280,11 @@ // Now, discard the bits significand = significand >> bitsDiscarded; - significand = (( ((long)(DoubleConsts.MIN_EXPONENT -1) + // subnorm exp. - (long)DoubleConsts.EXP_BIAS) << - (DoubleConsts.SIGNIFICAND_WIDTH-1)) - & DoubleConsts.EXP_BIT_MASK) | - (DoubleConsts.SIGNIF_BIT_MASK & significand); + significand = (( ((long)(Double.MIN_EXPONENT -1) + // subnorm exp. + (long)DoubleUtils.EXP_BIAS) << + (DoubleUtils.SIGNIFICAND_WIDTH-1)) + & DoubleUtils.EXP_BIT_MASK) | + (DoubleUtils.SIGNIF_BIT_MASK & significand); } } @@ -2349,8 +2347,8 @@ * minimum subnormal value and the sticky bit * information must be preserved (i.e. case 1). */ - if ((exponent >= FloatConsts.MIN_SUB_EXPONENT-1) && - (exponent <= FloatConsts.MAX_EXPONENT ) ){ + if ((exponent >= FloatUtils.MIN_SUB_EXPONENT-1) && + (exponent <= Float.MAX_EXPONENT ) ){ // Outside above exponent range, the float value // will be zero or infinity.