NaN format - Mailing list pgsql-hackers

From Marcus Mascari
Subject NaN format
Date
Msg-id 19990105085656.18550.rocketmail@send102.yahoomail.com
Whole thread Raw
Responses Re: NaN format  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
I saw the posting regarding the NaN issue and I 
thought you might be interested in the following:

Sun Microsystem's Numerical Computation Guide
which covers the IEEE 754 standard, states:

"NaN's are often represented as floating-point numbers
with the exponent e max + 1 and non-zero significands."

and

SoftFloat, a free software implementation of the
standard,
http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html,
defines the following:

default 32-bit NaN: 0xFFC00000
default 64-bit NaN: 0xFFF8000000000000

Assigning these values to int32_t and int64_t, and then
memcpying them to a float and a double representation
yeilded a TRUE result when testing with isnan().
If they are NaN under Linux/Intel implementation 
(2.0.36) using gcc 2.7.2.3 and math library 2.0.7 
of the IEEE 754 standard, is it not fair to say it 
would be true for all implementations?

For what its worth...

Marcus Mascari (mascarim@yahoo.com)








_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com



pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: [test] ignore this
Next
From: Angelos Karageorgiou
Date:
Subject: Re: [HACKERS] Still having trouble importing 6.3 DB