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

Re: [HACKERS] Regression tests on intel for 6.5.2

From: Christof Petig <christof(dot)petig(at)wtal(dot)de>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Regression tests on intel for 6.5.2
Date: 1999-09-29 15:05:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Lamar Owen wrote:

> On Mon, 27 Sep 1999, Tom Lane wrote:
> > which is evidently doing the wrong thing on your platform.  What does
> > your man page for exp() say about error return conventions?

I checked it twice, I can't find any error in the current sources. I even wrote a test program:
#include <math.h>
#include <stdio.h>
#include <errno.h>

int main()
{  double e;
   if (errno) perror("pow");
   if (!finite(e)) puts("!finite\n");
   else printf("%f\n",e);

pow: Numerical result out of range

So both methods seem to work. (finite is a function on glibc-2.1 systems)

Perhaps (strange thoughts come in to my mind ...) the compiler optimizes the function call into a
machine instruction ...
/tmp> cc -O2 -o test test.c -lm
/tmp> ./test

Looks like this is the case. So (I use gcc-2.95) what to do? Complain about a compiler/library bug
(doesn't set errno)? I would propose another autoconf test. (I could easily do it.)


PS: I found the offending inline routines in /usr/include/bits/mathinline.h

In response to


pgsql-hackers by date

Next:From: Thomas LockhartDate: 1999-09-29 15:07:53
Subject: Re: New notices?
Previous:From: Tom LaneDate: 1999-09-29 15:04:52
Subject: Re: [HACKERS] Planner drops unreferenced tables --- bug, no?

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