Hi, I have email from Georg Richter about this problem in my MySQL archive:
============================ From: "Georg Richter" <[EMAIL PROTECTED]> Hi, >From http://www.mysql.com/doc/en/Mathematical_functions.html: Note that the behaviour of ROUND() when the argument is half way between two integers depends on the C library implementation. Some round to the nearest even number, always up, always down, or always toward zero. If you need one kind of rounding, you should use a well-defined function like TRUNCATE() or FLOOR() instead. Regards Georg ============================ Mikhail. ----- Original Message ----- From: "Andrew Kuebler" <[EMAIL PROTECTED]> To: "'David Brodbeck'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 23, 2004 6:33 PM Subject: RE: Odd Rounding? > Actually, no, it rounds to .01233. > > > -----Original Message----- > > From: Andrew Kuebler [mailto:[EMAIL PROTECTED] > > > Can anyone explain why: > > > > SELECT ROUND(.012345, 5) > > -> .01234 > > > > Why doesn't mysql round the 5 up to .01235? How do I get it > > to round up? > > Oftentimes standard practice is to round up if the digit before the 5 is > odd, and round down if it's even. (This averages out the bias you > otherwise > get with 5/4 rounding.) To see if this is what you're seeing, try > rounding > 0.012335 to 5 places...I bet it'll round up to 0.01234. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]