[Top][All Lists]

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

[Gcl-devel] Re: printing IEEE 754 special values (inf, nan)

From: Raymond Toy
Subject: [Gcl-devel] Re: printing IEEE 754 special values (inf, nan)
Date: Tue, 05 Jul 2005 20:27:23 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Robert Dodier wrote:
Hello Camm,

Greetings!  I could probably implement 'Inf' an 'NaN' as the print
forms of these float pretty trivially -- the question is whether the
reader must be modified to read them in, and what are the compliance
issues if any.

Well, maybe some special symbols can be defined so
that floating point inf, -inf, and nan are printed as
those symbols.

This last one is unreadable, right? I'm guessing that's
because nan is not a single bit pattern but a range of bit patterns.
However, I don't see why nan couldn't be read as a specific
value; all nan's have the same properties.

I think that if you have readable NaN's, you should make it so that what you read is what was written. It would certainly break people's expectation if all printed NaN's got read as the same NaN.

Also, I think implementations are free to encode whatever they want in the bits, so it might be important for the implementation. But I might be wrong here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]