Re: [HACKERS] snapshot and FreeBSD-2.2.7 not building

From: Hal Snyder <hal(at)enteract(dot)com>
To: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] snapshot and FreeBSD-2.2.7 not building
Date: 1999-01-03 03:50:57
Message-ID: 87ww35qaji.fsf@hippo.roxor.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:

> I am now generating NAN by:
>
> double x;
>
> return (x-x)/(x-x);
>
> This seems to be the way my libm math library does it. The gcc2 -O4
> compile does not seem to optimize it away, so looks like it will work.
> My guess is that the compiler can not optimize floating-point
> computations.

Thanks for the follow-up. Suggestion:

At the top of numeric.c or in include/utils/numeric.h, put

#ifndef NAN
#define pgNAN (0.0/0.0)
#endif

Then in numeric.c, if NAN isn't defined,

return pgNAN;

--
Hal

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-01-03 05:30:09 Re: [HACKERS] snapshot and FreeBSD-2.2.7 not building
Previous Message Bruce Momjian 1999-01-03 02:54:10 Re: [HACKERS] snapshot and FreeBSD-2.2.7 not building