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

>No, actually 4.99999999999 (repeating) is the half-way point.

>5.0 is definitely in the top half.

4.99999999999 (repeating) = 5.00000000 (repeating)

Remember, repeating decimals are equal to an integer divided by 9.

1/9 = 0.1(repeating)

2/9 = 0.2(repeating)

3/9 = 0.3(repeating) = 1/3

4/9 = 0.4(repeating)

5/9 = 0.2(repeating)

6/9 = 0.6(repeating) = 2/3

7/9 = 0.7(repeating)

8/9 = 0.8(repeating)

9/9 = 0.9(repeating) = 1

Maybe this example will help illustrate the bias in >=5 rounding versus

odd/even rounding.

You have four numbers to sum, 1.5, 2.5, 3.5, 4.5

Using the decimal values:

1.5 + 2.5 + 3.5 + 4.5 = 12.

If we round using >=5 rounding:

2 + 3 + 4 + 5 = 14

If we round using odd/even rounding:

2 + 2 + 4 + 4 = 12

Is it any wonder that on Massachusetts State Income Taxes you must (by law)

use the >=5 rounding method, more revenue for the state :-).

Actually, because you use the same rounding for exemptions/deductions as for

income the revenue isn't any better for the state but, the simpler >=5

rounding is easier on the tax preparer.

BTW - The CINT() rounding function in all flavors of Microsoft Basic

languages uses odd/even rounding.

Paul

=========================================

Paul Hutchinson

Chief Engineer

Maximum Inc., 30 Samuel Barnet Blvd.

New Bedford, MA 02745

spamBeGonephutchinsonimtra.com

http://www.maximum-inc.com

=========================================

--

http://www.piclist.com hint: To leave the PICList

.....piclist-unsubscribe-request.....RemoveMEmitvma.mit.edu

In reply to: <3B16702B.35C6@ezy.net.au>

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