190
Appendix: Accuracy
of
Numerical Calculations
No
difference
will
be
perceived
at
first between Level
1 and
Level
2
by
readers accustomed
to
linear systems
and
small
signals
because
such
systems' errors
can be
referred indiscriminately
to
output
or
input.
However, other more general systems
that
are
digital
or
nonlinear
do not
admit arbitrary reattribution
of
output noise
to
input noise
nor
vice-versa.
For
example,
can all the
error
in |
COS|
be
attributed, merely
by
writing
|
COS
\(x)
—
cos(x
+
5x),
to an
input perturbation
8x
small
compared
with
the
input
xl
Not
when
x is
very small.
For
instance,
when
x
approaches
10~5
radians,
then
cos(x)
falls very
near
0.99999999995
and
must
then
round
to
either
1 =
cos(O)
or
0.9999999999
=
cos(1.414...
X
10"5).
Therefore
fcOSKx)
=
cos(x
+ Sx)
is
true only
if dx is
allowed
to be
relatively large, nearly
as
large
as
x
when
x is
very small.
If we
wish
to
explain
the
error
in |
COS
| by
using only relatively small perturbations,
we
need
at
least
two of
them:
one a
perturbation
dx —
(-6.58...
X
ID'14)*
smaller
than
roundoff
in the
input;
and
another
in the
output comparable with
roundoff
there,
so
that
|COS|Q)
=
(cos
+
<5cos)(;t
+ dx) for
some
unknown
|6cos|
^
(6 X
10~10)|cos|.
Like
|
COS
|,
every system
F in
Level
2 is
characterized
by
just
two
small
tolerances—call
them
e
and
77—that
sum up all you
have
to
know
about
that
system's internal noise.
The
tolerance
e
constrains
a
hypothetical output noise,
|6/|
^
e\f\,
and 77
constrains
a
hypothetical
input noise,
| dx\
TJ|
x ,
that
might appear
in a
simple
formula
like
F(x)
=
(f+6f)(x
+ dx)
for
5f\^e\f\d
|Sjc|s£?7|;c|.
The
goal
of
backward error analysis
is to
ascertain
that
all the
internal noise
of F
really
can be
encompassed
by so
simple
a
formula
with satisfactorily small tolerances
t
and
77.
At its
best,
backward
error
analysis
confirms
that
the
realized value F(x)
scarcely
differs
from
the
ideal value
f(x + dx)
that
would have been
produced
by an
input
x + Sx
scarcely
different
from
the
actual
input
x, and
gives
the
word
"scarcely"
a
quantitative meaning
(e
and
77).
But, backward error
analysis
succeeds only
for
systems
F
designed
very carefully
to
ensure
that
every
internal
noise source
is
equivalent
at
worst
to a
tolerably small input
or
output
perturbation.
First
attempts
at
system design, especially programs
to
perform numerical computations,
often
suffer
from
internal
noise
in a
more complicated
and
disagreeable
way
illustrated
by
the
following
example.