Java 8 RFR 6476168: (fmt) Inconsistency formatting subnormal doubles with hexadecimal conversion
Brian Burkhalter
brian.burkhalter at oracle.com
Mon Jul 22 23:47:55 UTC 2013
An updated webrev is in the same location: http://cr.openjdk.java.net/~bpb/6476168/.
On Jul 19, 2013, at 5:38 PM, Joseph Darcy wrote:
> A spec quibble "decimal separator" isn't really the appropriate term for the hex formatting.
I've changed this in the verbiage on lines 613 and 1376 of Formatter. The other usages of "decimal separator" are unchanged.
> I think some more test cases and needed:
>
> * Subnormal result rounding up to normal range under reduced precision. Something like nextDown(Double.MIN_NORMAL) (a subnormal value) rounded to between 1 and 11 digits of precision.
Added as Basic-X line 1360.
> * Double.MAX_VALUE rounded to fewer than 12 digits. Offhand, I'm not sure what the implementation will do here; returning infinity or a hex string with an extra big exponent are both defensible.
Added as Basic-X line 1361. The returned value for %1.9a is 0x1.000000000p1024.
Thanks,
Brian
More information about the core-libs-dev
mailing list