On Sun, Jul 02, 2000 at 05:22:53PM +0200, Peter Eisentraut wrote:
> pgsql-hackers(at)thewrittenword(dot)com writes:
>
> > 3. Why is NAN defined in src/include/solaris_i386.h as:
> > #define NAN (*(__const double *) __nan)
> > #endif /* GCC. */
> > if the compiler is not GCC? The Solaris C compiler does not like this.
> > I removed it and the compilation succeeded.
>
> We never cleared out this item. What is the proper way to generate a `NaN'
> on your compiler? Does `0.0/0.0' work?
I tried the following:
#include <ieeefp.h>
#include <stdio.h>
int
main (void) {
float f = 0.0/0.0;
if (isnanf (f)) {
puts ("nan");
}
}
and the output was "nan".
--
albert chin (china(at)thewrittenword(dot)com)
In response to
pgsql-hackers by date
| Next: | From: Karel Zak | Date: 2000-07-04 17:26:43 |
| Subject: Re: Statistical aggregates |
| Previous: | From: Bruce Momjian | Date: 2000-07-04 16:59:17 |
| Subject: Re: Statistical aggregates |