Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server
Date
Msg-id 287.1179790790@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server  (Shachar Shemesh <shachar@shemesh.biz>)
Responses Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server  (Shachar Shemesh <shachar@shemesh.biz>)
List pgsql-hackers
Shachar Shemesh <shachar@shemesh.biz> writes:
> As for the ARM architecture, I've pulled my sources, and the answer is
> this: ARM doesn't have one standard floating point format. Different ARM
> architectures will use different formats.

So how will you know which one is in use, which I'd think you'd need to
know to translate it?

> Most architectures will
> actually use IEEE, but some will use decimal based and such. According
> to my source (a distributor of ARM based hardware), none of the other
> formats will lose precision if translated to IEEE.

Your source appears fairly ignorant of things-float.  If they really are
using decimal FP, it's easy to demonstrate that a lossless conversion
to/from binary representation of similar size is impossible.  The set of
exactly representable values is simply different.

I have no objection to standardizing on IEEE-on-the-wire if you can
prove that's a superset of everything else.  Unfortunately, you can't,
because it isn't.  As soon as you get into lossy conversions, you might
as well use text and avoid the issue.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server
Next
From: John DeSoi
Date:
Subject: Re: pg_get_tabledef