piclist 2001\06\01\051140a >
www.piclist.com/techref/index.htm?key=brain+burp+rounding
BY : Roman Black email (remove spam text)

William Chops Westfield wrote:
>
>     I don't understand your logic?? There are 500 values,
>     ie, 000 to 499, then there are 500 values in the top
>     half, ie, 500 to 999. The dividing point is *immediately*
>     before 500, ie, 499.999999999999999 (forever)
>
>     So if it starts with a 5 it absolutely must be in the
>     top half. There is no favoring, just accuracy.
>
> No, because we're not talking about "number of values" when rounding, we're
> talking about a "distance."  There are (always) an infinite number of values
> between any two numbers, but .5 is exactly half-way between 0 and 1, so
> going consistantly either up or down introduces a slight bias.

Alright, so you are saying it looks more like
this:

0 to 499 = bottom half (500 units)
501 to 999 = top half. (499 units)

This still makes no sense to me. You have a very
obvious bias, one half is bigger than the other.
We are not working with distances, instead there
are a very finite number of possible combinations
in our 3 digits. 0 to 999. There are 1000 total
possible numerical combinations.

1000 can't be included as it is the first combination
of the next 1000 units. And 2000 is the first of the
next block after that.

If you don't believe me write a program that generates
a 3-digit random number and then round it... 500 is
past half way and must be rounded up. :o)
-Roman

--