Re: Possible rounding error of large float values? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Possible rounding error of large float values?
Date
Msg-id 20040824183612.M67501@megazone.bigpanda.com
Whole thread Raw
In response to Re: Possible rounding error of large float values?  ("Iain" <iain@mst.co.jp>)
List pgsql-sql
On Wed, 25 Aug 2004, Iain wrote:

>
> # select 9223372036854775807 = 9223372036854775807::float;
>  ?column?
> ----------
>  t
> (1 row)

> This and the fact that it's still possible to find the row using the
> original value would seem to indicate that the rounding is just a display
> artifact..

I don't think that's true since the number ending in 807 is equal to a
version ending in 808.

sszabo=# select 9223372036854775807 = 9223372036854775808::float;?column?
----------t
(1 row)

(In this next one I'm casting both because I want to choose the types of
both literals)

sszabo=#  select 9223372036854775807::float =
9223372036854775808::numeric;?column?
----------t
(1 row)




pgsql-sql by date:

Previous
From: "Iain"
Date:
Subject: Re: Possible rounding error of large float values?
Next
From: "Iain"
Date:
Subject: Re: Possible rounding error of large float values?