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 20121.1179929516@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:
> Before you explode at me (again :), I'm not arguing that you can do
> binary based calculations of decimal numbers without having rounding
> errors that come to bite you. I know you can't. What I'm saying is that
> we have two cases to consider. In one of them the above is irrelevant,
> and in the other I'm not so sure it's true.

You're setting up a straw-man argument, though.  The real-world problem
cases here are not decimal, they are non-IEEE binary floating
arithmetic.  The typical difference from IEEE is slightly different
tradeoffs in number of mantissa bits vs number of exponent bits within a
32- or 64-bit value.  I seem to recall also that there are machines that
treat the exponent as power-of-16 not power-of-2.  So depending on which
way the tradeoffs went, the other format will have either more precision
or more range than IEEE.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: msvc, build and install with cygwin in the PATH
Next
From: Andrew Dunstan
Date:
Subject: Re: like/ilike improvements