This round discussion has nothing to do with floating point
approximations.

Most round routines are statistically biased on the high side. The MySQL
round is statistically correct. The more accurate rounding rule is 

        If digit following the column you are rounding is a 5
                If digit in the round column is even then 
                        round down 
                else
                        round up
        else
                if digit > 5 then
                        round up
                else
                        round down
                end if
        end if 

I built an Excel spreadsheet and the "regular" round routine introduced
a 10 times larger round error than the one above on ~200 values.

Gordon
Interstate Software
A MySQL training partner



---------------------------------------------------------------------
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

Reply via email to