www.piclist.com/techref/index.htm?key=brain+burp+rounding

Roman Black wrote:

{Quote hidden}

I have used the following:

3.12350 = 3.124 (if exactly .xxx50000, round up if previous digit odd)

3.12450 = 3.124 (if exactly .xxx50000, round down if previous digit

even)

The idea here is that if you are tallying a series of values, the

"random" nature of rounding some up, some down will "tend" to average

out the errors. (This is a very debatable subject!)

3.12451 = 3.125 (greater than .xxx50 so round up)

3.12449 = 3.124 (less than .xxx50 so round down)

following the previous two examples:

3.1245000000001 = 3.125 (greater than .xxx50 so round up)

3.1244999999999 = 3.124 (less than .xxx50 so round down)

for the examples you used:

3.1245551 = 3.125 (greater than .xxx50 so round up)

3.1245556 = 3.125 (greater than .xxx50 so round up)

David W. Gulley

Destiny Designs

--

http://www.piclist.com#nomail Going offline? Don't AutoReply us!

email @spam@listservSTOPspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

See also: www.piclist.com/techref/index.htm?key=brain+burp+rounding