Approximate Calculations
- Any decimal number (n) can be approximated by rounding either up or down.
- Rounding Down is when the approximated value (a) is less than the actual decimal value (n) $$ a < n $$
- Rounding Up is when the approximated value (a) is greater than the actual decimal value (n) $$ a > n $$
How Rounding Works
- If the first ignored digit is 5 or higher, add one to the last retained digit.
- If the first ignored digit is less than 5, leave the last retained digit unchanged.
Why Round Numbers? Rounding helps to simplify calculations, makes numbers easier to interpret, and can clarify information. For instance, it’s far easier to work with an approximated 87.4 than the precise value of 87.421. However, rounding introduces a small margin of error, which can affect the accuracy of results.
Practical Example
Consider the decimal number 87.427
$$ n = 87.427 $$
Let’s round it to one decimal place (nearest tenth)
Here, the first ignored digit is 2, and the last retained digit is 4
$$ n = 87.4 \color{red}21 $$
Since 2 < 5, we leave the last digit (4) as it is.
$$ a = 87.4 $$
Example 2
Using the same number:
$$ n = 87.427 $$
This time, let’s round to two decimal places (nearest hundredth)
Now, the first ignored digit is 7, and the last retained digit is 2
$$ n = 87.42 \color{red}7 $$
Since 7 ≥ 5, we increase the last retained digit (2) by one.
This changes the last retained digit to 3
$$ n = 87.43 $$
Absolute and Relative Error
Rounding creates a certain margin of error, which can be measured in two ways:
- Absolute Error
Absolute error (e) is the absolute difference between the original number (n) and its rounded value (a) $$ e = |n - a| $$Example: In the previous example, the absolute error is $$ e = |87.427 - 87.4| = 0.027 $$
- Relative Error
Relative error (e_r) is the ratio of the absolute error (e) to the absolute value of the approximated number (a) $$ e_r = \frac{|n - a|}{|a|} = \frac{e}{|a|} $$
Example: In the previous example, the relative error is $$ e_r = \frac{0.027}{|87.4|} = 0.00308924485 $$ In percentage terms, the relative error is approximately 0.3%.
Which Measure to Use?
Absolute error does not provide a consistent measure of error, as it varies with the size of the number.
For a more accurate estimate of error, relative error is typically preferred.
Example: Two approximated values, 802 ≈ 800 and 82 ≈ 80, have the same absolute error e = 2. However, the approximation 800 is significantly more accurate than 80, because the same absolute error (2) has a different impact on hundreds (800±2) versus tens (80±2).
Error Propagation
Each approximation introduces an error, and this error grows with each subsequent operation.
The more operations performed after rounding, the greater the accumulated error in calculations.
Error propagation depends on the type of operation:
- For addition and subtraction, the maximum absolute error is the sum of the absolute errors of each term. $$ e = e_1 + e_2 $$
- For multiplication and division, the maximum relative error is the sum of the relative errors of each term. $$ e_r = e_{r1} + e_{r2} $$
Example
Suppose we have two numbers:
$$ n_1 = 12331 $$
$$ n_2 = 8168 $$
We approximate these numbers by rounding to the nearest hundred
$$ a_1 = 12300 $$
$$ a_2 = 8200 $$
The absolute errors are:
$$ e_1 = |12331 - 12300| = 31 $$
$$ e_2 = |8168 - 8200| = |-32| = 32 $$
Note: The relative errors are $$ e_{r1} = \frac{31}{|12300|} = 0.0025203252 ≈ 0.25\% $$ $$ e_{r2} = \frac{32}{|8200|} = 0.00390243902 ≈ 0.39\% $$
Now, let’s add the two rounded numbers
$$ s = a_1 + a_2 $$
$$ s = 12300 + 8200 = 20500 $$
The absolute error in this rounded sum is the sum of the absolute errors of the addends
$$ e_s = e_1 + e_2 $$
$$ e_s = 31 + 32 = 63 $$
Note: The absolute error introduced by rounding grows with each operation. The relative error in the sum is approximately 3.1% $$ e_r = \frac{63}{|20500|} = 0.00312195121 ≈ 3.1\% $$
This means the exact sum (s_r) lies between
$$ s - e_s < s_r < s + e_s $$
$$ 20500 - 63 < s_r < 20500 + 63 $$
$$ 20487 < s_r < 20563 $$
Thus, only the first two digits of the sum (2 and 0) are reliable since they match in both rounding up and down.
Verification: The exact sum of the unrounded values is $$ s_r = n_1 + n_2 $$ $$ s_r = 12331 + 8168 = 20499 $$