src/share/classes/java/lang/Double.java
Print this page
*** 281,291 ****
return Double.toString(d);
else {
// Initialized to maximum size of output.
StringBuffer answer = new StringBuffer(24);
! if (FpUtils.rawCopySign(1.0, d) == -1.0) // value is negative,
answer.append("-"); // so append sign info
answer.append("0x");
d = Math.abs(d);
--- 281,291 ----
return Double.toString(d);
else {
// Initialized to maximum size of output.
StringBuffer answer = new StringBuffer(24);
! if (Math.copySign(1.0, d) == -1.0) // value is negative,
answer.append("-"); // so append sign info
answer.append("0x");
d = Math.abs(d);
*** 320,330 ****
// value for double; otherwise, extract and report d's
// exponent (the representation of a subnormal uses
// E_min -1).
answer.append("p" + (subnormal ?
DoubleConsts.MIN_EXPONENT:
! FpUtils.getExponent(d) ));
}
return answer.toString();
}
}
--- 320,330 ----
// value for double; otherwise, extract and report d's
// exponent (the representation of a subnormal uses
// E_min -1).
answer.append("p" + (subnormal ?
DoubleConsts.MIN_EXPONENT:
! Math.getExponent(d) ));
}
return answer.toString();
}
}