These are regular floating point numbers, and behave accordingly.

Serena Lien wrote:
I have read some of the postings/faq about the difficulties with the round
function, when certain numbers do not have a finite representation in
binary, which SQLite uses. eg 9.95 is actually 9.9499...etc so that round(
9.95, 1) rounds down.

But, I have found several numbers which don't get rounded at all, and in
fact return more decimal places!

round(98926650.5, 1) -> 98926650.5000001
round(85227887.01, 1) -> 85227887.0000001

Even if these numbers cannot be represented properly in binary, why is it
they aren't rounded?

thanks for any assistance,
Serena


On 8/31/07, Serena Lien <[EMAIL PROTECTED]> wrote:

Hello,

With SQLite 3.3.13, this returns 98926650.5000001
Can you explain how I can get the expected rounding/truncation?

thanks.





-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to