[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stds-754] Comments on draft 1.2 of 17 Sept ... NaN payloads



Jeff Kidder reminds me that the standard states:
 The representation includes two nans: sNaN and qNaN.

(Perhaps not what we should have done, he says.)

Ok, this lets 3.2.32 "radix" off the hook.  That would make NaN payloads
strictly part of the encoding -- but then I don't understand why we are
concerned about what happens to payloads during conversions.

Conversions are supposed to preserve representations (if possible),
but certainly not encodings (as most conversions will canonicalize
the encoding).  In fact, the only canonical NaNs would be those with
a payload of zero!  This is however not stated anywhere, not even in
8.2.1 and 8.2.2.  However, I cannot see it ruled out either, and since
we are already supposed to read between the lines when it comes to
encodings, one could probably do so.

When 7.12.1 (paragraph 1) states some conditions under which NaNs
"are reproduced exactly as well", we are not really saying what
"exactly" means.  We know it does not mean "same encoding"; we guess
it means "same representation".  Well, paragraphs 2 and 3 of 7.12
clearly refer to "representations", so that must be what is meant
later on.  So for NaN payloads it is critical to know whether they
are part of the representation or not.

The best clue we have is on page 18, middle of 5.3, where what used
to be known as "representable entities" (now FPD) are listed:

    - signed zero and non-zero FPNs
    - two infinities
    - quiet and signaling NaNs

    These are the only FPD provided.

What is not stated is how many NaNs there are.  The text is clear
about infinities:  many encodings (in decimal), but only two FPDs.
Clearly there are many FPNs.  It does not say that there are only
two NaNs.  From this I conclude that Jeff's interpretation is wrong:
Jeff inserted an explicit "two" that I cannot find in the standard:
 The representation includes two nans: sNaN and qNaN.

HOWEVER, the last paragraph of 5.2 does suggest (but does not state
clearly), under the definition of "encoding", that "Multiple NaN
bitstrings may be used to store retrospective diagnostic information
(see 8.2)."  In 8.2 there is no mention of representations, but it is
stated that payloads should be preserved if possible.

So payloads are really neither here nor there...

I suspect we'll have to leave this as murky as it currently stands...

Michel.
Sent: 2006-09-18 20:18:40 UTC

754 | revision | FAQ | references | list archive