HP 15c User Manual

Page 146

Advertising
background image

146

Appendix: Accuracy of Numerical Calculations

146

where payment = $0.01 = one penny per second,

i = 0.1125 = 11.25 percent per annum interest rate,

n = 60Ч60Ч24Ч365 = number of seconds in a year.

Using her HP-15C, Susan reckons that the total will be $376,877.67. But at year's end the
bank account is found to hold $333,783.35. Is Susan entitled to the $43,094.32 difference?

In both examples the discrepancies are caused by rounding errors that could have been
avoided. This appendix explains how.

The war against error begins with a salvo against wishful thinking, which might confuse
what we want with what we get. To avoid confusion, the true and calculated results must be
given different names even though their difference may be so small that the distinction seems
pedantic.

Example 3: Pi. The constant π = 3.1415926535897932384626433….

Pressing the $ key on the HP-15C delivers a different value

$ = 3.141592654

which agrees with π to 10 significant digits. But $≠ π, so we should not be surprised
when, in Radians mode, the calculator doesn't produce sin $ = 0.

Suppose we wish to calculate x but we get X instead. (This convention is used throughout this
appendix.) The error is x - X. The absolute error is |x X|. The relative error is usually
reckoned (x - X)/x for x ≠ 0.

Example 4: A Bridge Too Short. The lengths in meters of three sections of a cantilever
bridge are designed to be

x=333.76 y=195.07 z=333.76.

The measured lengths turn out to be respectively

X=333.69 Y=195.00 Z=333.72.

The discrepancy in total length is

d = (x + y + z) - (X + Y + Z) = 862.59 - 862.41 = 0.18.

Ed, the engineer, compares the discrepancy d with the total length (x + y + z) and considers
the relative discrepancy

d/( x + y + z) = 0.0002 = 2 parts in 10,000

to be tolerably small. But Rhonda, the riveter, considers the absolute discrepancy |d| = 0.18
meters (about 7 inches) much too large for her liking; some powerful stretching will be

Advertising