HP -15C Advanced Functions Handbook page 184

Hide thumbs Also See for HP-15C:
Table of Contents

Advertisement

182
Appendix: Accuracy of Numerical Calculations
Display
009-
26 Places 1 in X-register.
010-43,30, 6 Tests M 5*1.
011-
30 Calculates u — 1 when
!) or
012-
013-
014-
10 Calculates x / ( u -
1/1.
20 Calculates A(x).
43 32
The calculated value of u, correctly rounded by the HP-15C, is
u = (1 + e) (1 + x), where|e| < 5 X lO'
10
. Ifu = 1, then
too, in which case the Taylor series X(x) — x (I — Vzx + Vzx
2
— ...)
tells us that the correctly rounded value of \(x) must be just x.
Otherwise, we shall calculate * A(w — !)/(« — 1) fairly accurately
instead of k(x). But A(x)/x = 1 — V-ix + Vox'
2
— ... varies very slowly,
so slowly that the absolute error k(x)/x — A(u — l)/(u ~ 1) is no
worse than the absolute error x — (« — !) = — e(l + x), and if x ^ 1,
this error is negligible relative to \(x)/x. When x > 1, then u — 1 is
so nearly x that the error is negligible again; A(;t) is correct to nine
significant digits.
As usual in error analyses, the explanation is far longer than the
simple procedure being explained and obscures an important fact:
the errors in ln(a) and u — 1 were ignored during the explanation
because we knew they would be negligible. This knowledge, and
hence the simple procedure, is invalid on some other calculators
and big computers! Machines do exist which calculate ln( u) and/or
1 — u with small absolute error, but large relative error when u is
near 1; on those machines the foregoing calculations must be
wrong or much more complicated, often both. (Refer to the
discussion under Level 2 for more about this.)
Back to Susan's sum. By using the foregoing simple procedure to
calculate \(i/n) = ln(l + i/n) = 3.567351591 X 1CT
9
, she obtains a
better value:
(1 + i/n)
n
=
enk(l/n)
= 1.119072257

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents