12
ERROR:
ITS
SOURCES, PROPAGATION, AND ANALYSIS
Example (a)
In
base
2,
the digits are 0 and
1.
As an example of the conversion
of
a base 2
number
to decimal,
we
have
(1101l.Olh
= 1 · 2
4
+ 1 · 2
3
+ 0 · 2
2
+ 1 · 2
1
+ 1 · 2° +
0.
2-
1
+
1.
2-
2
= 27.25
When
using numbers in some other base, we will often use
(x)p
to indicate that
the
number
x is to
be
interpreted in the base
{3
number system.
(b)
In
base 16, the digits are
0,
1,
...
,
9,
A,·-··,
F.
As an example of the
conversion
of
such a number to decimal, we have
(56C.F)
16
= 5 · 16
2
+ 6 · 16
1
+ 12 · 16° +
15
·
16-
1
= 1388.9375
The
conversion
of
decimal numbers to binary
is
examined in the problems.
Let
{3
denote the number base being used in the computer. Then a nonzero
number
x in the computer is stored essentially in the form
(1.2.1)
with
o = + 1
or
- 1, 0
.:::;
a;
.:::;
{3
-
1,
e an integer, and
The
term o is called the sign, e is called the exponent, and
(.a
1
· • • a
1
)p
is called
the
mantissa
of
the floating-point number x. The number
{3
is also called the
radix, and the point preceding a
1
in (1.2.1) is called the radix point, for example,
decimal
point
(/3
= 10), binary point
(/3
=
2).
The
integer t gives the number of
base
{3
digits in the representation.
We
will always assume
giving
what
is called the normalized floating-point representation, We will also
assume
that
{1.2.2)
which limits the possible size
of
x.
The
number x = 0
is
always allowed,
requiring a special representation. Table 1.1 contains the values
of
{3,
t,
L,
and U
for a
number
of
common computers.
The
use.
of
{3,
t,
L,
and U to specify the
arithmetic characteristics is based
on
that in [Forsythe
et
al. (1977), p. 11]. Some
computers use a different placement of the radix point (e.g.,
CDC
CYBER). We
have modified their exponent bounds so that the limits
on
the size of a
floating-point number will be correct when using the theory
of
this section. We
also include results for double precision representations
on
some computers that
include
it
in
their hardware. In
Table
1.1 there are additional columns that will
be
explained later.