Henry Miller wrote:
As for 5/2, my grade school teachers taught me that if I round it at
all, the answer is 3, NEVER 2.   It is only latter in life that I
learned about bankers rounding which sometimes is 2, sometimes 3.    I
have never seen a justification for rounding to 2, except for the bogus
answer that it is easy for the computer to do.   Thus I conclude
whatever the final answer is, sqlite would be wrong if 5/2 is always 2.

The problem with the grade-school rule is that, assuming the last digit is uniformly distributed, you'll be rounding up 5 times out of 9 and rounding down 4 times out of 9. That means that if you add up a large number of rounded numbers, the result will always be larger than the what you'd get if you added up the unrounded numbers and then rounded the sum. That introduces a systematic bias in financial and statistical calculations.

Reply via email to