Roundoff Error

MME 523

 

No calculation in mathematics is perfect. No matter what we write down for the decimal form of an answer, it has some error associated with it.  The subject of these notes is to discuss how much error is associated with the process of rounding numbers off.

 

 

Why do we care?

 

In engineering and computer science, all projects come with specifications. This includes what is to be done and how accurately it is to be done. If you are an engineer and asked to machine a part with a certain diameter, that specification will also tell you how accurate the work must be. For example, it might specify something to be 3.27" +/- .02.  That means that you can be off either way by .02" or, as long as you are in the range from 3.25" to 3.29", you are ok.  The number .02 is sometimes called the tolerance.

 

Another way to specify desired accuracy is to speak in terms of how many decimal places are desired. We will use this in this course.  Thus a problem may ask you to find the approximate answer to “3 decimal places”.

 

Review: How do you round off correctly?

 

Let's say someone asks us what p is to “4 decimal places”. We get out a calculator and find it to say that

 

                        p =3.141592654

 

(Now actually that statement is false. p is an irrational number, meaning it continues on indefinitely in decimal form hence the "=" sign should be replaced by "»"  for "approximately equal")

But back to our question of getting 4 decimal places. The procedure for this is as follows: you go out to the 5th place and see what number is there. If it is 5 or greater than you round the 4th place up. If it is 4 or less, you leave the 4th place alone. You then truncate (cut off ) the number at the 4th place.

Here we find a 9 in the 5th place, so we bump up the 5 to a 6 and make the statement

 

to 4 decimal places, p is equal to  3.1416.

 

By the same procedure, to 5 places, p is equal to 3.14159  (because of the 2 in the 6th place).

 

General procedure:  to obtain an approximation accurate to n places, go to the n+1st place and see what digit is there. If it is 5 or greater, increase the nth place by 1. If it is 4 or less, leave the nth place alone. Last, truncate the decimal at the nth place.

 

How much possible error is associated with rounding off?  Lets say we are  working with a number whose value is  2.785499 and use 3 places.  This means:

 

we give 2.785 as our 3 place approximation, because the 4th place had a 4 in it.

 

How much were we off by? We dropped the .000499, so we were off by that much; that is the error associated with the round off procedure.

 

Suppose the number had been  2.672500 and we round off to 3 places. Then our answer would be 2.673 due to the 5 in the 4th place.  Our error would be .0005 in this case.

 

These are extreme examples illustrated the worst case error associated with rounding off. From these two examples, we can make the general rule:

 

if you round off to n decimal places, the error associated with this will be no more than

 

                .000…05     (where there are n  0s before the 5)

 

 

or            5 x  10-(n+1)   in scientific notation

 

Summary:

 

2 decimal place accuracy has a maximum error of .005

3 decimal place accuracy has a maximum error of .0005

4 decimal place accuracy has a maximum error of .00005

.

.

n decimal place accuracy has a maximum error of .00…05  (n 0s)

 

In the context of this course, if a problem requires, say, 3 decimal place accuracy, then you will need to make enough computations for a maximum error of .0005. There will be formulas for helping make that determination. But you will need to know the relation between maximum error and decimal place accuracy, which is what we have done here.