(j3.2006) Signaling NaN (oops)

Robert Corbett robert.corbett
Fri Mar 11 21:03:53 UTC 2011


On 3/11/2011 12:57 PM, Robert Corbett wrote:
> On 3/11/2011 10:44 AM, Bill Long wrote:
>>
>>
>> On 3/11/11 11:45 AM, Tobias Burnus wrote:
>>> On 03/11/2011 06:19 PM, Bill Long wrote:
>>>> The standard does specify some of this, and other parts are "processor
>>>> dependent".
>>>
>>> Well, I think it specifies the general format: A NaN is printed. And as
>>> one can deduce from the input format, a signalling NaN, if printed as
>>> such, has the format "NaN(" + some non-zero-sized string + ")". 
>>> (Though,
>>> the reverse does not work: If there are alphanumeric letters between 
>>> the
>>> "()", it can still be a quiet NaN.)
>>>
>>>> Note that the standard (inconsistently) requires that on INPUT, the
>>>> text is expected to be "NAN"
>>>
>>> No, it does not: "A lower-case letter is equivalent to the 
>>> corresponding
>>> upper-case letter in an IEEE exceptional specification or the exponent
>>> in a numeric input field."
>>
>>
>> Quite right.  I'll have our output form fixed.  (I'd also suggest 
>> that the input form in the standard be written as "NaN", which is 
>> equally valid as "NAN", but less confusing.
>>
> I think that will move your implementation out of conformance.  The 
> standard says
> to write 'NAN' or 'NAN()'.  The permission granted on input is not 
> granted for output.

Oops.  I see I mixed lines of the standard.  You are correct, the output 
form must be
'NaN'.

Robert Corbett



More information about the J3 mailing list