> 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)
Good point. I think that the problems with using floats are well documented
(I particulary
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..
TED]>
To: "Josh Berkus" <[EMAIL PROTECTED]>
Cc: "Adam Lancaster" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 5:21 AM
Subject: Re: [SQL] Possible rounding error of large float values?
> On Tue, 2
On 8/24/2004 4:21 PM, Oliver Elphick wrote:
On Tue, 2004-08-24 at 20:52, Josh Berkus wrote:
Adam,
> 9223372036854775807
>
> It gets selected out as:
>
> 9.22337203685478E18
This is a property of FLOAT data types. They round.
> Which appears to be rounded. When we cast it to numeric type we get:
>
On Tue, 2004-08-24 at 20:52, Josh Berkus wrote:
> Adam,
>
> > 9223372036854775807
> >
> > It gets selected out as:
> >
> > 9.22337203685478E18
>
> This is a property of FLOAT data types. They round.
>
> > Which appears to be rounded. When we cast it to numeric type we get:
> >
> > 9223372036854
Adam,
> 9223372036854775807
>
> It gets selected out as:
>
> 9.22337203685478E18
This is a property of FLOAT data types. They round.
> Which appears to be rounded. When we cast it to numeric type we get:
>
> 922337203685478
>
> Which also is rounded. It is still possible to find the row usi
Title: Possible rounding error of large float values?
When setting a float column to this value:
9223372036854775807
It gets selected out as:
9.22337203685478E18
Which appears to be rounded. When we cast it to numeric type we get:
922337203685478
Which also is rounded. It is s