JDK 9 RFR of JDK-8164524: Correct inconsistencies in floating-point abs spec
joe.darcy at oracle.com
Sat Aug 20 23:10:00 UTC 2016
On 8/20/2016 3:16 PM, Martin Buchholz wrote:
> On Sat, Aug 20, 2016 at 12:32 PM, Martin Buchholz <martinrb at google.com
> <mailto:martinrb at google.com>> wrote:
> Quibble: "guaranteed" may be true in practice,
> but longBitsToDouble is technically permitted to reset the sign
> bit back to 1 if the hardware is hostile. Because of this, I would
> simply remove the word "guaranteed".
> After reading IEEE 754 2008 6.2.1. , I now believe signalling NaNs
> have to use the significand bits; the sign bit is free to use; and so
> I retract my quibble, and am happy with the word "guaranteed".
Right; the sign bit of a NaN has very little meaning. The hardware guys
like to be able to do things like for a floating-point multiply "sign
bit of output = XOR of sign bits of inputs" without having to do
inconvenient NaN checks :-) The NaN payload for retrospective
diagnostics is all in the significand.
More information about the core-libs-dev