Re: Possible rounding error of large float values?

Re: Possible rounding error of large float values?

am 24.08.2004 21:52:30 von Josh

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:
>
> 9223372036854780000
>
> Which also is rounded. It is still possible to find the row using the
> original value

Hmmm ... is 15 digits the limit of NUMERIC? It may be.

> Is this expected behavior?

Yes.

--
Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match