Re: CSV arm check failure

Поиск
Список
Период
Сортировка
От Jim Buttafuoco
Тема Re: CSV arm check failure
Дата
Msg-id 20050106150102.M70588@contactbda.com
обсуждение исходный текст
Ответ на Re: CSV arm check failure  (Marko Kreen <marko@l-t.ee>)
Список pgsql-hackers
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 <peter_e@gmx.net>
Cc: jim@contactbda.com, 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 -------



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: CSV arm check failure
Следующее
От: "Serguei Mokhov"
Дата:
Сообщение: Re: [pgsql-ru-general] Final call for translation updates