Appendix: accuracy of numerical calculations, Misconceptions about errors, Accuracy of numerical calculations – HP 15c User Manual
Page 145
145
Appendix:
Accuracy of Numerical Calculations
Misconceptions About Errors
Error is not sin, nor is it always a mistake. Numerical error is merely the difference between
what you wish to calculate and what you get. The difference matters only if it is too big.
Usually it is negligible; but sometimes error is distressingly big, hard to explain, and harder
to correct. This appendix focuses on errors, especially those that might be large—however
rare. Here are some examples.
Example 1: A Broken Calculator. Since
x
x
2
)
(
whenever x ≥ 0, we expect also
2
2
2
2
)
(
x
x
f
should equal x too.
A program of 100 steps can evaluate the expression f(x) for any positive x. When x = 10 the
HP-15C calculates 1 instead. The error 10 − 1 = 9 appears enormous considering that only
100 arithmetic operations were performed, each one presumably correct to 10 digits. What
the program actually delivers instead of f(x) = x turns out to be
,
1
0
for
0
1
for
1
)
(
x
x
x
f
which seems very wrong. Should this calculator be repaired?
Example 2: Many Pennies. A corporation retains Susan as a scientific and engineering
consultant at a fee of one penny per second for her thoughts, paid every second of every day
for a year. Rather than distract her with the sounds of pennies dropping, the corporation
proposes to deposit them for her into a bank account in which interest accrues at the rate of
11¼ percent per annum compounded every second. At year's end these pennies will
accumulate to a sum
n
i
n
i
n
1
1
)
payment
(
tota
l
50
roots
50
squares