Re: 7.0.2 on Solaris

From: pgsql-hackers(at)thewrittenword(dot)com
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 7.0.2 on Solaris
Date: 2000-07-04 17:26:34
Message-ID: 200007041728.MAA29313@postal.thewrittenword.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2000-07-04 17:26:43 Re: Statistical aggregates
Previous Message Bruce Momjian 2000-07-04 16:59:17 Re: Statistical aggregates