Re: [HACKERS] NAN code

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: jwieck@debis.com
Cc: hackers@postgreSQL.org
Date: 1999-01-04T15:59:53Z
Lists: pgsql-hackers
>     num is  of  type  Numeric,  which  is  a  pointer  to  struct
>     NumericData!   So  the  above  should result in some compiler
>     warning (in fact it type casts a pointer into a double  value
>     - and that will give unpredictable results).
> 
>     Seems  that only isnan() is defined as part of Posix. But not
>     a definition that can force a NAN.  So  we  have  to  find  a
>     portable  way  to  define the value NaN for double and float.
>     Does anybody know of such a way?

See my later postings.  0.0/0.0 seems to do it.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026