From: Dag Sondre Hansen Date: March 11 1999 4:42pm Subject: Error in MySQL "round" function. List-Archive: http://lists.mysql.com/myodbc/7 Message-Id: <36E7F27F.2C2A193D@topp.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This one made me scratch my head for quite some time - turned out to be a bug in the round()-function. It occurs only when there is only one decimal to be "removed" by round(), and that decimal is 5. In this case the function returns 0 when the correct answer is 1. mysql> select round(0.5, 0 ) ; +------------------+ | round(0.5, 0 ) | +------------------+ | 0 | <==== +------------------+ 1 row in set (0.00 sec) "select round(0.05, 1 )" and "select round(0.005, 2 )" etc. produces the same result. dagS