I thought I knew how to round numbers, I really did. I even taught it in maths classes in high schools for a while. However how I do it is not how most computers do it.

When you learn how to round at school you're told that the midpoint always goes up. So 4.5 rounds up to 5. Well, actually 'up' is a little confusing as -4.5 rounds to -5. Basically you round to the bigger absolute number.

Computers, and indeed most of the non-pure maths world, do something else. This is because of a bias. The bias can best be explained by an example:

Say you have 10 things to divide up between two people, one of whom gets 3/4 and the other gets the remaining 1/4.

Easy enough maths: one gets 7.5 and one gets 2.5

Only, we can't split these things, so let's round:

7.5 rounds up to 8, 2.5 rounds up to 3.

In a recent post Why Doesn't Anyone Give a Crap About Freedom Zero? Jeff Atwood poses an interesting question.

Freedom Zero is the right to run software however you wish. It's universal for true Open Source projects where you can download the source and extend it as needed.

I think the problem with Freedom Zero is the assumption that what people want is freedom of choice. They certainly say they want it, and most of us think we want it.
Label Cloud
Blog Archive
About Me
About Me
Blogroll
Blogroll
Loading