src/share/classes/java/lang/Float.java
Print this page
*** 24,34 ****
*/
package java.lang;
import sun.misc.FloatingDecimal;
- import sun.misc.FpUtils;
import sun.misc.FloatConsts;
import sun.misc.DoubleConsts;
/**
* The {@code Float} class wraps a value of primitive type
--- 24,33 ----
*** 277,287 ****
if (Math.abs(f) < FloatConsts.MIN_NORMAL
&& f != 0.0f ) {// float subnormal
// Adjust exponent to create subnormal double, then
// replace subnormal double exponent with subnormal float
// exponent
! String s = Double.toHexString(FpUtils.scalb((double)f,
/* -1022+126 */
DoubleConsts.MIN_EXPONENT-
FloatConsts.MIN_EXPONENT));
return s.replaceFirst("p-1022$", "p-126");
}
--- 276,286 ----
if (Math.abs(f) < FloatConsts.MIN_NORMAL
&& f != 0.0f ) {// float subnormal
// Adjust exponent to create subnormal double, then
// replace subnormal double exponent with subnormal float
// exponent
! String s = Double.toHexString(Math.scalb((double)f,
/* -1022+126 */
DoubleConsts.MIN_EXPONENT-
FloatConsts.MIN_EXPONENT));
return s.replaceFirst("p-1022$", "p-126");
}