nan or -nan?
bearophileHUGS at lycos.com
Thu Nov 17 17:29:40 PST 2011
> On 11/17/2011 3:57 PM, bearophile wrote:
> > It's a NaN, but floating point designers have given a sign to NaNs for a (small) purpose.
> What is that purpose?
I didn't know the answer, so I've done a short research (finding texts like this: http://grouper.ieee.org/groups/754/email/msg03893.html ), I have found that languages usually ignore the sign of the NaNs (while the sign of zero has some purposes). Producing the same bit patterns for 32 and 64 bit compilers is useful for output binary consistency for comparisons, but comparing floating point values bitwise is usually a not so wise thing to do. So I think there is no need to put this in Bugzilla.
Thank you for your question, bye,
More information about the Digitalmars-d