Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Shachar Shemesh <shachar(at)shemesh(dot)biz>
  • Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Greg Smith <gsmith(at)gregsmith(dot)com>, oledb-devel(at)pgfoundry(dot)org
  • Subject: Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server
  • Date: Wed, 23 May 2007 10:11:56 -0400
  • Message-id: <20121(dot)1179929516(at)sss(dot)pgh(dot)pa(dot)us>

Shachar Shemesh <shachar(at)shemesh(dot)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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group