Re: [HACKERS] NAN code - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] NAN code
Date
Msg-id 199901041559.KAA11505@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] NAN code  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] NAN code  (jwieck@debis.com (Jan Wieck))
List 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,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: Date/time fixes for HAVE_TM_ZONE platforms
Next
From: "Vazsonyi Peter[ke]"
Date:
Subject: Q: CURSOR tuples count