May 2008
12 posts
May 22nd
2 tags
May 20th
2 tags
May 20th
2 tags
May 20th
May 13th
May 13th
2 tags
May 13th
2 tags
May 13th
May 9th
May 7th
May 6th
Why does ROUND(9.95,1) return 9.9 instead of 10.0?...
SQLite uses binary arithmetic and in binary, there is no way to write 9.95 in a finite number of bits. The closest you can get to 9.95 in a 64-bit IEEE float (which is what SQLite uses) is 9.949999999999999289457264239899814128875732421875. So when you type “9.95”, SQLite really understands the number to be the much longer value shown above. And that value rounds down. This kind of...
May 3rd