Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Karel ZakDate: 2000-07-04 17:26:43
Subject: Re: Statistical aggregates
Previous:From: Bruce MomjianDate: 2000-07-04 16:59:17
Subject: Re: Statistical aggregates

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group