> Round to nearest even is the default IEEE rounding mode. This means that 5.5 rounds to 6, and 6.5 also rounds to 6.
Wat. I had never even heard about this, but the more I read and think about it, the more this rule makes sense to me.
How did I miss this - is this commonly taught in school and I just did not pay attention? It seriously worries me that I don't even know how to round properly - I always thought of myself as a math-and-sciency guy...
I learned about this in HS chem class and it's always stuck, even if people don't use it in informal settings. Also called "unbiased rounding" or "bankers' rounding" [1]
it's rarely taught in school. Most people know that you round .5 up, but that is a slightly uneven distribution and rounding to the even number however produce a perfectly even distribution. It's also the way you round in the financial sector.
I don't believe the round-to-next-even-method will give you a perfectly even distribution. Benford's law can be generalized to the second, third, ... digit, and although the distribution is not as skewed as for the first digit [1], you'd still be rounding down a bit more often than rounding up.
Benford's law applied to rounding floats is splitting hairs, really - but it goes to show how even "simple" things like rounding can be really difficult if you only worry about them for too long.
Benfords law only applies to certain sets of numbers.
Not all numbers display Benfords law. Therefore Benfords law should not be considered when talking about rounding unless there's a reason to think that it applies to your particular set of numbers.
It would be interesting to know what sets of numbers do not follow Benford's law.
Check Knuth's discussion of it in "The Art of Computer Programming, section 4.2.4 where he talks about the distribution of floating point numbers. Benford's research took numbers from 20299 different sources. Additionally, the phenomenon is bolstered by noticing, in the pre-calculator days, that the front pages of logarithm books tended to be more worn than the back pages.
The whole discussion covers about four pages, and contains what I think of adequate mathematics demonstrating the point.
The interesting thing about Benford's law is how widely applicable it is. Most sets of numbers you come across in your life are likely to follow it, or at least have leading 1s be more common than leading 9s. As such we should definitely be considering it when trying to decide which rounding rule to adopt in the general case.
I'll try to make the parent's point a different way. This is about rounding. That's about the digits with the least significance. A good rounding scheme wants to see a uniform distribution there in the two least significant digits. Benford's law breaks down after four digits pretty much completely. That's the over-thinking it aspect.
Financial sector of many (all?) countries in UE is required to round all .5 up. If you use banker's rounding, you might get into trouble with the tax office. So always check the local regulations for the rounding mode.
Percentages is the best example of why it's so useful. For value A at 41.5% and value B at 58.5% their sum is equal to 100%. Rounding up would make them 42% and 59% respectively, thus 101% in total. Round half to even ensures the final values of 42% and 58% sum to 100% as intended.
Wat. I had never even heard about this, but the more I read and think about it, the more this rule makes sense to me.
How did I miss this - is this commonly taught in school and I just did not pay attention? It seriously worries me that I don't even know how to round properly - I always thought of myself as a math-and-sciency guy...