On Wed, Jan 5, 2011 at 8:27 AM, Jon Polfer <jpol...@forceamerica.com> wrote:
>> But....the more important questoin is "Does it make a difference to
> your application?"
>
> Not really.  I've talked with the PMs and such about it, and this
> doesn't seem to be a problem.  I wanted to know how SQLite3 worked in
> this department, and this seems to be okay behavior for my application.
> The PMs and I were happy to learn about how the strategy worked.
>
> This peaks my interest though:  Is adding that value in the third
> decimal place going to ensure that rounding will work appropriately in
> all cases?

Adding .001 won't make it work in all cases, then 3.0499 rounded to
one place will be 3.1.  You can push the window out further, like
round(3.05 + .000001, 1).  Unfortunately, the problem is intrinsic to
the representation, and you cannot generically band-aid around it.  If
you could generically band-aid it, it would be part of the spec, and
the problem would never have come up.

Of course, for your particular application you might be just fine with
a particular work-around.  Depends on the application and the data it
manipulates, though.

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

Reply via email to