On Jul 12, 2008, at 4:41 PM, Radovan Antloga wrote:

> please check this sql:
>
> select cast((2.3 * 100) as integer), cast(round(2.3 * 100) as  
> integer), 2.3 * 100, cast(230.0 as integer)
>
> Is this proper behaviour ?
>

Yes it is.  The CASE(* AS INTEGER) operation rounds toward zero.  And  
2.3*100.0 in IEEE float notation is  
229.999999999999971578290569595992565155029296875 which when rounded  
toward zero yields 229.

See also http://www.sqlite.org/faq.html#q16

D. Richard Hipp
[EMAIL PROTECTED]



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

Reply via email to