Re: [HACKERS] Regression tests on intel for 6.5.2
От | Thomas Lockhart |
---|---|
Тема | Re: [HACKERS] Regression tests on intel for 6.5.2 |
Дата | |
Msg-id | 37F3005C.3B0514C8@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: [HACKERS] Regression tests on intel for 6.5.2 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> > > 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... > So both methods seem to work. (finite is a function on glibc-2.1 systems) And that is the problem. I didn't have enough platforms to test on, so when I improved the code I did so in a way that I would get a better result on at least my platform (probably RH4.2 or earlier) without breaking the behavior on other platforms. So, I test locally for finite() being defined as a macro! But on newer glibc systems it is a real function, so you are seeing the old behavior. A better thing to do would be to define HAVE_FINITE, and to have a ./configure test for it. That should be easy enough; do you have time to look at it? Then code like #ifndef finite if (errno == ERANGE) #else /* infinity implies overflow, zero implies underflow */ if (!finite(*result) || *result == 0.0) #endif Could become ... #if HAVE_FINITE ... - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
В списке pgsql-hackers по дате отправления: