HP 15c User Manual

Page 147

Advertising
background image

Appendix: Accuracy of Numerical Calculations

147

needed to line up the bridge girders before she can rivet them together. Both see the same
discrepancy d, but what looks negligible to one person can seem awfully big to another.

Whether large or small, errors must have sources which, if understood, usually permit us to
compensate for the errors or to circumvent them altogether. To understand the distortions in
the girders of a bridge, we should learn about structural engineering and the theory of
elasticity. To understand the errors introduced by the very act of computation, we should
learn how our calculating instruments work and what are their limitations. These are details
most of us want not to know, especially since a well-designed calculator's rounding errors are
always nearly minimal and therefore appear insignificant when they are introduced. But
when on rare occasions they conspire to send a computation awry, they must be reclassified
as "significant" after all.

Example 1 Explained. Here f(x) = s(r(x)), where





50

2

1

)

(

x

x

x

r

and

.

)

(

)

)

)

)

((

((

)

(

50

2

2

2

2

2

r

r

r

s

The exponents are ½

50

= 8.8818×10

-16

and 2

50

= 1.1259×10

15

. Now, x must lie between 10

-99

and 9.999 ... × 10

99

since no positive numbers outside that range can be keyed into the

calculator. Since r is an increasing function, r(x) lies between

r(10

-99

) = 0.9999999999997975…

and

r(10

100

) = 1.0000000000002045… .

This suggests that R(x), the calculated value of r(x), would be 1 for all valid calculator
arguments x. In fact, because of roundoff,

.

99

10

999999999

.

9

1

for

000000000

.

1

1

0

for

9999999999

.

0

)

(

x

x

x

R

If 0 < x < 1, then x ≤ 0.9999999999 in a 10-digit calculator. We would then rightly expect
that

9999999999

.

0

x

, which is 0.999999999949999999998..., which rounds to

0.9999999999 again. Therefore, if ¤ is pressed arbitrarily often starting with x < 1, the
result cannot exceed 0.9999999999. This explains why we obtain R(x) = 0.9999999999 for

50

roots

50

squares

Advertising