Notes on Embedding – Rounding

When you add two counting numbers, the result is again a counting number.  When you multiply two counting numbers, the result is again a counting number.  A fancy way of saying the same things is that counting numbers are closed under addition, and counting numbers are closed under multiplication.  Adding and multiplying stay within the club.

In our first note on embedding, we played with some of the consequences of the same thing being true for even numbers: adding two even numbers again gets you an even number (fancy way of saying it: even numbers are closed under addition) and the even numbers are also closed under multiplication.

Some groups of numbers are closed under one operation but not another.  For example, the group of odd numbers is closed under multiplication (any two odd numbers, when you multiply them, you get another odd number.)  But the group of odd numbers is not closed under addition, since it is easy to find odd numbers that don’t add up to an odd number.  When you add odd numbers, you can land on numbers outside of the club.

For operations, too, we may have one group of number under which that operation is closed, and another group of numbers under which that operation is not closed.  When you subtract two counting numbers you may land on something that is not a counting number, e.g.  3 – 7.  So counting numbers are not closed under subtraction.  But the group of integers (which include the positive whole numbers, the negative whole numbers and zero) is closed under subtraction.  Any two integers, when you subtract them, you get another integer.  In a real sense, that was always the point of introducing negative numbers in the first place: so that we could have a club of numbers big enough to allow subtraction to happen within the club.

Sometimes, you can adapt operations so that your favorite club is closed under that operation.  In this post, we will look at rounding as a way to modify an operation.  Many of us are familiar with rounding numbers to the nearest hundredth, so we’ll start with that.  Let’s take as our club of numbers all those numbers that have at most two non-zero digits to the right of the decimal point.  So 5, -4, 1.01, 2.7 and -1.33 are in the club, but 4.005 is not.  This particular club happens to be closed under addition, but it is not closed under multiplication.  For example, 1.01 \times 2.4 = 2.424 and 2.424 is not in the club even though both 1.01 and 2.4 are.  Yet I could introduce a special kind of multiplication that works just like the usual one except that it lands on the member of the club that is closest to the “real” multiplication.  For this adapted multiplication, we’d get  1.01 × 2.4 = 2.42.

We can use the same technique, or trick, to introduce rounding for any club of numbers.  Let’s say that I’m interested in the club of decimal numbers below 1000.  This club is not closed under addition, nor under multiplication, since it is easy to find numers below 1000 that add up to more than 1000 or that multiply to more than 1000.  But I can always find the sum or the product in the club that’s closest to the real sum or product.   What this amounts to in this example, is that I would add up or multiply the numbers and cap the result at 1000, refusing to go any higher.  800 + 198 = 998,   800 + 199 = 999,    800 + 200 = 1000,     800 + 201 = 1000,    800 + 202 = 1000.

We could even round to the club of powers of two.  If the club of the powers of two starts with 1 and includes 2, 4, 8, etc., then this club happens to be closed under multiplication, but not under addition.  We could adapt addition to stay within the club by rounding the sum to the nearest power of two; in case of a tie, we’ll go to the higher power of two.  So 8 + 2 = 8,     8 + 4 = 16,    8 + 8 = 16,   8 + 16 = 32.

These adapted operations – adapted by forcing the result to stay within our designated club of numbers – in some ways behave like the familiar operations and in some ways behave differently.  For example, the adapted operations we’ve introduced above are all commutative just like the original operations.  When you multiply two numbers, the order of the two numbers doesn’t matter, and the same is true for the adapted multiplication, that is, ordinary multiplication followed by rounding to land on the closest number within the designated club.  However, if you add three numbers, the order of the three numbers could well matter, when rounding is involved.   In our example of the club of powers of two, we could add 8 + 2 + 2 either by first adding 8 + 2 and then adding 2 to the result, or we could first add 2 + 2 and add the result of that to 8.  In the first case, we get

8 + 2 = 8,     8 + 2 = 8,

whereas in the second case we get

2 + 2 = 4,    8 + 4 = 16.

When doing computations using calculators or computers, rounding is always a consideration, and the order in which you do the operations may have a big impact.  For example, a particular 4-function calculator with an 8-digit screen might be capable of handling the following club of numbers: all positive or negative eight-digit numbers, where the decimal point can be anywhere with respect to those eight digits.  So 98765432 would be in the club, and so would 987654.32, and -765.012, but not 12.3456789 because the latter requires more than eight digits in its expression and wouldn’t fit on the screen.  And yet, at first blush, we can say that the calculator is fully embedded in the world of numbers on the number line, its precision usually sufficient, its limitations only becoming visible when you are doing something quite sophisticated.

Advertisements
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s