David Fetter wrote:
On Fri, Oct 30, 2009 at 08:51:57PM -0700, John R Pierce wrote:
Tom Lane wrote:
There is special-purpose software out there that can compute
exactly with rational numbers, but you aren't likely to find it
embedded in any general-purpose tools like databases --- the
us
On Fri, Oct 30, 2009 at 11:51 PM, John R Pierce wrote:
> Tom Lane wrote:
>>
>> There is special-purpose software out there that can compute exactly
>> with rational numbers, but you aren't likely to find it embedded in any
>> general-purpose tools like databases --- the use-case just isn't wide
>>
On Fri, Oct 30, 2009 at 08:51:57PM -0700, John R Pierce wrote:
> Tom Lane wrote:
>> There is special-purpose software out there that can compute
>> exactly with rational numbers, but you aren't likely to find it
>> embedded in any general-purpose tools like databases --- the
>> use-case just isn't
Tom Lane wrote:
There is special-purpose software out there that can compute exactly
with rational numbers, but you aren't likely to find it embedded in any
general-purpose tools like databases --- the use-case just isn't wide
enough. One reason why not is that it'll still fall down on irrationa
Robert Haas writes:
> In general, floating point arithmetic is inaccurate and sucky. That
> has nothing to do with PostgreSQL; it's just life.
Actually, I think these examples are being done in "numeric" not float8.
Your comment stands though --- 1.0/3.0 does not give the exact rational
number 1
On Fri, Oct 30, 2009 at 1:39 AM, Gray wrote:
>
> The following bug has been logged online:
>
> Bug reference: 5150
> Logged by: Gray
> Email address: g...@ms-irk.ru
> PostgreSQL version: 8.2.6
> Operating system: i686-pc-linux-gnu
> Description: math bug
> Details:
>
>
The following bug has been logged online:
Bug reference: 5150
Logged by: Gray
Email address: g...@ms-irk.ru
PostgreSQL version: 8.2.6
Operating system: i686-pc-linux-gnu
Description:math bug
Details:
select 1/3*3,(1.0/3.0)*3.0,floor((1.0/3.0)*3.0);
returns
0, 1, 0