Marko/All, I wrote the following test program
#include <stdio.h> #include <math.h> #define HYPOT(A, B) sqrt((A) * (A) + (B) * (B)) int main() { printf("SQRT Test\n"); long double a; a = HYPOT(0-10,0-10); printf("double a = %20.12Lf\n",a); exit(0); } and compiled it as follows gcc -lm -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -g -o sqrttest sqrt.c with the following results: SQRT Test double a = 14.142135623731 which is the exact answer in the "results" file for point. Now if I use perl instead of "C" I get the wrong answer 14.1421356237309 which is what postgres is also reporting. So this looks like a compile time problem which is alittle over my head. Any idea's Jim Jim ---------- Original Message ----------- From: Marko Kreen <marko@l-t.ee> To: Peter Eisentraut <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED], pgsql-hackers <pgsql-hackers@postgresql.org> Sent: Thu, 6 Jan 2005 15:26:05 +0200 Subject: Re: [HACKERS] CSV arm check failure > On Thu, Jan 06, 2005 at 10:18:58AM +0100, Peter Eisentraut wrote: > > Am Dienstag, 4. Januar 2005 19:03 schrieb Jim Buttafuoco: > > > ARM platform fails the "point" test see below. > > > > For the 7.4 release we got a report for the ARM platform where all tests > > passed: > > > > http://archives.postgresql.org/pgsql-hackers/2003-10/msg01212.php > > > > So either there are various degrees of ARM processors or something is > > broken. > > Ideas? > > Yes, there are various degrees of those, but most of them should be > FPU-less. So FPU-emulation details would be interesting. > > In case of Linux there are 3 variants: > > NWFPE: default > > FastFPE: only 32-bit mantissa, 4-8x faster than NWFPE > > gcc -msoft-float: no FP instructions, direct calls. This > changes calling convention, so requires that all > code is compiled with this. > > Jim, do you happen to use FastFPE? > > -- > marko ------- End of Original Message ------- ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly