r/programming • • Nov 24 '16

A Rebuttal For Python 3

https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/
383 Upvotes

218 comments sorted by

View all comments

Show parent comments

3

u/dynpert Nov 24 '16

With this method you end up rounding up about 50% of the time, and down about 50% of the time, so no bias (unless you only work with numbers between 0 and 1)

10

u/dakarananda Nov 24 '16

doesn't this just substitute the rounding up/down bias for a "prefer-even-numbers" bias?. I.e. doesn't this way of rounding make even numbers statisticaly more likely from random data?

(I might just need coffee though)

3

u/Poddster Nov 24 '16

doesn't this just substitute the rounding up/down bias for a "prefer-even-numbers" bias?

Yes! Good catch. However it's better than always rounding down :) There's a lot of theory about rounding modes. Just google for "rounding mode bias" or something and you'll be reading for the next 20 years.

Some people also make pretty graphs to illustrate the biases, but I don't have any links to hand.