NaN format

From: Marcus Mascari <mascarim(at)yahoo(dot)com>
To: jwieck(at)debis(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: NaN format
Date: 1999-01-05 08:56:56
Message-ID: 19990105085656.18550.rocketmail@send102.yahoomail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yahoo(dot)com)

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Angelos Karageorgiou 1999-01-05 09:14:14 Re: [HACKERS] Still having trouble importing 6.3 DB
Previous Message Oleg Broytmann 1999-01-05 08:49:18 Re: Date/time fixes for HAVE_TM_ZONE platforms