Stéphane Thiers
<stephane.thiers-JhUR7tGRpkB8UrSeD/[EMAIL PROTECTED]> wrote:
If you do:
INSERT INTO myTable
VALUES('0.12345678901234559') // the column is of REAL type
and read back the value
SELECT * FROM myTable
then you get a value==0.12345678901234600 !!
the 2 values are different. What's the problem??
There is an infinite number of strings consisting of decimal digits, but
only a finite number of distinct floating point values representable in
64 bits. Thus, it is clearly impossible for every such string to
round-trip through the floating number and back without loss. What you
see is a rounding error. For more details (than you ever wanted to
know), see
http://blogs.sun.com/darcy/resource/Wecpskafpa-ACCU.pdf
http://docs.sun.com/source/806-3568/ncg_goldberg.html
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------