Re: [HACKERS] NAN code

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: jwieck(at)debis(dot)com
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] NAN code
Date: 1999-01-04 15:59:53
Message-ID: 199901041559.KAA11505@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vazsonyi Peter[ke] 1999-01-04 16:01:48 Q: CURSOR tuples count
Previous Message Constantin Teodorescu 1999-01-04 14:45:32 Re: [HACKERS] SQLJ