Re: [HACKERS] Regression tests on intel for 6.5.2
От | Christof Petig |
---|---|
Тема | Re: [HACKERS] Regression tests on intel for 6.5.2 |
Дата | |
Msg-id | 37F22ABD.50997341@wtal.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] Regression tests on intel for 6.5.2 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Regression tests on intel for 6.5.2
|
Список | 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; errno=0; e=pow(100,200); if (errno) perror("pow"); if (!finite(e)) puts("!finite\n"); else printf("%f\n",e); } Output: pow: Numerical result out of range !finite 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 !finite 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.) Christof PS: I found the offending inline routines in /usr/include/bits/mathinline.h
В списке pgsql-hackers по дате отправления: