Shane Harrelson wrote:
> http://www.sqlite.org/lang_corefunc.html#round
> 
> Under the covers, when the second term to ROUND(X,y) is omitted, SQLite adds
> 0.5 and then truncates.    Because of floating point precision, some numbers
> can not be represented exactly... causing the odd rounding you saw in your
> examples.

While it's true that some numbers cannot be represented exactly in floating 
point, numbers like 40223, 0.5 and 40223.5 are in fact represented exactly. I 
don't think this can explain the behavior observed.

Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to