Hi Mihail Manolov wrote: > Hey guys, > > did you spot this problem? > > mysql> select truncate(199.20,2); > +--------------------+ > | truncate(199.20,2) | > +--------------------+ > | 199.19 | > +--------------------+ > 1 row in set (0.00 sec) > > Bug?
No. Feature :) This is described in manual at: http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#IDX1285 This is common problem with foalting point arithmetics.Try following and you will understand the problem better: mysql> select truncate(199.20,10); +---------------------+ | truncate(199.20,10) | +---------------------+ | 199.1999999999 | +---------------------+ -- Best regards -- For technical support contracts, visit https://order.mysql.com/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria <___/ www.mysql.com M: +359 88 231668 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php