I expected floats of 15 significant decimal digits or less to round-trip:

sqlite> create table t1(d float);
sqlite> insert into t1 values(8.948471e15);
sqlite> select * from t1;
8.94847100000001e+15

The double value stored in the database is correct (I traced the code and
printed the value of 'realvalue' in sqlite3VXPrintf()) -- it's
0x1.fca96433ce600p+52
= 11111110010101001011001000011001111001110011000000000 = 8948471000000000 =
8.948471e15. In other words, the original decimal to floating-point
conversion was done correctly, but the floating-point to decimal conversion
was not.

(This is different than the issue of bug
http://www.sqlite.org/src/tktview?name=1248e6cda8 .)

Rick Regan

-- 
Check out my blog: http://www.exploringbinary.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to