Appendix:
Accuracy
of
Numerical Calculations
183
from
which
the
correct total
follows.
To
understand
the
error
in
3201,
note
that
this
is
calculated
as
e20i
in(3)
=
e220.82i...
TQ
kegp
the
final
relative
error
below
one
unit
in
the
10th significant digit,
201
ln(3)
would
have
to be
calculated
with
an
absolute error
rather
smaller
than
10~10,
which would
entail carrying
at
least
14
significant digits
for
that
intermediate
value.
The
calculator does carry
13
significant
digits
for
certain
intermediate calculations
of its
own,
but a
14th
digit
would
cost
more
than
it's worth.
Level
1C:
Complex
Level
1
Most
complex arithmetic functions cannot guarantee
9 or 10
correct significant
digits
in
each
of a
result's real
and
imaginary
parts
separately, although
the
result will
conform
to the
summary
statement about functions
in
Level
1
provided
f, F, and e are
interpreted
as
complex numbers.
In
other words, every complex
function
/ in
Level
1C
will produce
a
calculated complex value
F=(l
+
t)f
whose small complex relative error
e
must satisfy
|e|
<
10~9.
The
complex functions
in
Level
1C are
0,
B,
[ill.
|LN|,
I
LOG
|,
|
SIN"11,
|
COS"11,
|
TAN"11,
|SINH"1|,
|
COSH"11,
and
|TANH"1|.
Therefore,
a
function like
X(z)
ā
ln(l
+ 2) can be
calculated accurately
for all z
by
the
same program
as
given above
and
with
the
same
explanation.
To
understand
why a
complex result's real
and
imaginary
parts
might
not
individually
be
correct
to 9 or 10
significant
digits,
consider
[x],
for
example:
(a + ib) X (c + id) = (ac
ā
bd) +
i(ad+
be)
ideally.
Try
this
with
a = c
=
9.999999998,
6
=
9.999999999,
and
d
=
9.999999997;
the
exact value
of the
product's real
part
(acā
bd)
should
then
be
(9.99999999S)2
-
(9.999999999)
(9.999999997)
=
99.999999980000000004
-
99.999999980000000003
=
10-18
which
requires
that
at
least
20
significant digits
be
carried during
the
intermediate calculation.
The
HP-15C carries
13
significant
digits
for
internal intermediate results,
and
therefore obtains
0
instead
of
10~18
for the
real part,
but
this
error
is
negligible
compared
to the
imaginary
part
199.9999999
.