<s>
In	O
computing	O
,	O
a	O
roundoff	B-Algorithm
error	I-Algorithm
,	O
also	O
called	O
rounding	B-Algorithm
error	I-Algorithm
,	O
is	O
the	O
difference	O
between	O
the	O
result	O
produced	O
by	O
a	O
given	O
algorithm	O
using	O
exact	O
arithmetic	O
and	O
the	O
result	O
produced	O
by	O
the	O
same	O
algorithm	O
using	O
finite-precision	O
,	O
rounded	B-Algorithm
arithmetic	O
.	O
</s>
<s>
Rounding	B-Algorithm
errors	I-Algorithm
are	O
due	O
to	O
inexactness	O
in	O
the	O
representation	O
of	O
real	O
numbers	O
and	O
the	O
arithmetic	O
operations	O
done	O
with	O
them	O
.	O
</s>
<s>
When	O
using	O
approximation	O
equations	O
or	O
algorithms	O
,	O
especially	O
when	O
using	O
finitely	O
many	O
digits	O
to	O
represent	O
real	O
numbers	O
(	O
which	O
in	O
theory	O
have	O
infinitely	O
many	O
digits	O
)	O
,	O
one	O
of	O
the	O
goals	O
of	O
numerical	B-General_Concept
analysis	I-General_Concept
is	O
to	O
estimate	B-Algorithm
computation	O
errors	O
.	O
</s>
<s>
Computation	O
errors	O
,	O
also	O
called	O
numerical	B-Algorithm
errors	I-Algorithm
,	O
include	O
both	O
truncation	B-Algorithm
errors	I-Algorithm
and	O
roundoff	B-Algorithm
errors	I-Algorithm
.	O
</s>
<s>
When	O
a	O
sequence	O
of	O
calculations	O
with	O
an	O
input	O
involving	O
any	O
roundoff	B-Algorithm
error	I-Algorithm
are	O
made	O
,	O
errors	O
may	O
accumulate	O
,	O
sometimes	O
dominating	O
the	O
calculation	O
.	O
</s>
<s>
In	O
ill-conditioned	B-Algorithm
problems	O
,	O
significant	O
error	O
may	O
accumulate	O
.	O
</s>
<s>
In	O
short	O
,	O
there	O
are	O
two	O
major	O
facets	O
of	O
roundoff	B-Algorithm
errors	I-Algorithm
involved	O
in	O
numerical	B-General_Concept
calculations	I-General_Concept
:	O
</s>
<s>
The	O
ability	O
of	O
computers	O
to	O
represent	O
both	O
magnitude	O
and	O
precision	B-Architecture
of	O
numbers	O
is	O
inherently	O
limited	O
.	O
</s>
<s>
Certain	O
numerical	O
manipulations	O
are	O
highly	O
sensitive	O
to	O
roundoff	B-Algorithm
errors	I-Algorithm
.	O
</s>
<s>
The	O
error	O
introduced	O
by	O
attempting	O
to	O
represent	O
a	O
number	O
using	O
a	O
finite	O
string	O
of	O
digits	O
is	O
a	O
form	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
called	O
representation	O
error	O
.	O
</s>
<s>
Increasing	O
the	O
number	O
of	O
digits	O
allowed	O
in	O
a	O
representation	O
reduces	O
the	O
magnitude	O
of	O
possible	O
roundoff	B-Algorithm
errors	I-Algorithm
,	O
but	O
any	O
representation	O
limited	O
to	O
finitely	O
many	O
digits	O
will	O
still	O
cause	O
some	O
degree	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
for	O
uncountably	O
many	O
real	O
numbers	O
.	O
</s>
<s>
Additional	O
digits	O
used	O
for	O
intermediary	O
steps	O
of	O
a	O
calculation	O
are	O
known	O
as	O
guard	B-Algorithm
digits	I-Algorithm
.	O
</s>
<s>
Rounding	B-Algorithm
multiple	O
times	O
can	O
cause	O
error	O
to	O
accumulate	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
9.945309	O
is	O
rounded	B-Algorithm
to	O
two	O
decimal	B-Architecture
places	I-Architecture
(	O
9.95	O
)	O
,	O
then	O
rounded	B-Algorithm
again	O
to	O
one	O
decimal	B-Architecture
place	I-Architecture
(	O
10.0	O
)	O
,	O
the	O
total	O
error	O
is	O
0.054691	O
.	O
</s>
<s>
Rounding	B-Algorithm
9.945309	O
to	O
one	O
decimal	B-Architecture
place	I-Architecture
(	O
9.9	O
)	O
in	O
a	O
single	O
step	O
introduces	O
less	O
error	O
(	O
0.045309	O
)	O
.	O
</s>
<s>
This	O
can	O
occur	O
,	O
for	O
example	O
,	O
when	O
software	O
performs	O
arithmetic	O
in	O
x86	O
80-bit	O
floating-point	B-Algorithm
and	O
then	O
rounds	O
the	O
result	O
to	O
IEEE	O
754	O
binary64	O
floating-point	B-Algorithm
.	O
</s>
<s>
Compared	O
with	O
the	O
fixed-point	O
number	O
system	O
,	O
the	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
is	O
more	O
efficient	O
in	O
representing	O
real	O
numbers	O
so	O
it	O
is	O
widely	O
used	O
in	O
modern	O
computers	O
.	O
</s>
<s>
While	O
the	O
real	O
numbers	O
are	O
infinite	O
and	O
continuous	O
,	O
a	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
is	O
finite	O
and	O
discrete	O
.	O
</s>
<s>
Thus	O
,	O
representation	O
error	O
,	O
which	O
leads	O
to	O
roundoff	B-Algorithm
error	I-Algorithm
,	O
occurs	O
under	O
the	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
.	O
</s>
<s>
A	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
is	O
characterized	O
by	O
integers	O
:	O
</s>
<s>
A	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
is	O
normalized	O
if	O
the	O
leading	B-Architecture
digit	I-Architecture
is	O
always	O
nonzero	O
unless	O
the	O
number	O
is	O
zero	O
.	O
</s>
<s>
Thus	O
,	O
the	O
normalized	O
form	O
of	O
a	O
nonzero	O
IEEE	O
floating-point	B-Algorithm
number	I-Algorithm
is	O
where	O
.	O
</s>
<s>
In	O
binary	O
,	O
the	O
leading	B-Architecture
digit	I-Architecture
is	O
always	O
so	O
it	O
is	O
not	O
written	O
out	O
and	O
is	O
called	O
the	O
implicit	O
bit	O
.	O
</s>
<s>
This	O
gives	O
an	O
extra	O
bit	O
of	O
precision	B-Architecture
so	O
that	O
the	O
roundoff	B-Algorithm
error	I-Algorithm
caused	O
by	O
representation	O
error	O
is	O
reduced	O
.	O
</s>
<s>
Since	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
is	O
finite	O
and	O
discrete	O
,	O
it	O
cannot	O
represent	O
all	O
real	O
numbers	O
which	O
means	O
infinite	O
real	O
numbers	O
can	O
only	O
be	O
approximated	O
by	O
some	O
finite	O
numbers	O
through	O
rounding	B-Algorithm
rules	O
.	O
</s>
<s>
The	O
floating-point	B-Algorithm
approximation	O
of	O
a	O
given	O
real	O
number	O
by	O
can	O
be	O
denoted	O
.	O
</s>
<s>
The	O
IEEE	O
standard	O
stores	O
the	O
sign	O
,	O
exponent	O
,	O
and	O
mantissa	O
in	O
separate	O
fields	O
of	O
a	O
floating	B-Algorithm
point	I-Algorithm
word	O
,	O
each	O
of	O
which	O
has	O
a	O
fixed	O
width	O
(	O
number	O
of	O
bits	O
)	O
.	O
</s>
<s>
The	O
two	O
most	O
commonly	O
used	O
levels	O
of	O
precision	B-Architecture
for	O
floating-point	B-Algorithm
numbers	I-Algorithm
are	O
single	O
precision	B-Architecture
and	O
double	O
precision	B-Architecture
.	O
</s>
<s>
Machine	B-Algorithm
epsilon	I-Algorithm
can	O
be	O
used	O
to	O
measure	O
the	O
level	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
in	O
the	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
.	O
</s>
<s>
The	O
machine	B-Algorithm
epsilon	I-Algorithm
,	O
denoted	O
,	O
is	O
the	O
maximum	O
possible	O
absolute	B-Algorithm
relative	I-Algorithm
error	I-Algorithm
in	O
representing	O
a	O
nonzero	O
real	O
number	O
in	O
a	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
.	O
</s>
<s>
The	O
machine	B-Algorithm
epsilon	I-Algorithm
,	O
denoted	O
,	O
is	O
the	O
smallest	O
number	O
such	O
that	O
.	O
</s>
<s>
There	O
are	O
two	O
common	O
rounding	B-Algorithm
rules	O
,	O
round-by-chop	O
and	O
round-to-nearest	O
.	O
</s>
<s>
This	O
rounding	B-Algorithm
rule	I-Algorithm
is	O
biased	O
because	O
it	O
always	O
moves	O
the	O
result	O
toward	O
zero	O
.	O
</s>
<s>
Round-to-nearest	O
:	O
is	O
set	O
to	O
the	O
nearest	O
floating-point	B-Algorithm
number	I-Algorithm
to	O
.	O
</s>
<s>
When	O
there	O
is	O
a	O
tie	O
,	O
the	O
floating-point	B-Algorithm
number	I-Algorithm
whose	O
last	O
stored	O
digit	O
is	O
even	O
(	O
also	O
,	O
the	O
last	B-Architecture
digit	I-Architecture
,	O
in	O
binary	O
form	O
,	O
is	O
equal	O
to	O
0	O
)	O
is	O
used	O
.	O
</s>
<s>
For	O
IEEE	O
standard	O
where	O
the	O
base	O
is	O
,	O
this	O
means	O
when	O
there	O
is	O
a	O
tie	O
it	O
is	O
rounded	B-Algorithm
so	O
that	O
the	O
last	B-Architecture
digit	I-Architecture
is	O
equal	O
to	O
.	O
</s>
<s>
This	O
rounding	B-Algorithm
rule	I-Algorithm
is	O
more	O
accurate	O
but	O
more	O
computationally	O
expensive	O
.	O
</s>
<s>
Rounding	B-Algorithm
so	O
that	O
the	O
last	O
stored	O
digit	O
is	O
even	O
when	O
there	O
is	O
a	O
tie	O
ensures	O
that	O
it	O
is	O
not	O
rounded	B-Algorithm
up	O
or	O
down	O
systematically	O
.	O
</s>
<s>
This	O
is	O
to	O
try	O
to	O
avoid	O
the	O
possibility	O
of	O
an	O
unwanted	O
slow	O
drift	O
in	O
long	O
calculations	O
due	O
simply	O
to	O
a	O
biased	O
rounding	B-Algorithm
.	O
</s>
<s>
The	O
following	O
example	O
illustrates	O
the	O
level	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
under	O
the	O
two	O
rounding	B-Algorithm
rules	O
.	O
</s>
<s>
The	O
rounding	B-Algorithm
rule	I-Algorithm
,	O
round-to-nearest	O
,	O
leads	O
to	O
less	O
roundoff	B-Algorithm
error	I-Algorithm
in	O
general	O
.	O
</s>
<s>
Suppose	O
the	O
usage	O
of	O
round-to-nearest	O
and	O
IEEE	O
double	O
precision	B-Architecture
.	O
</s>
<s>
Since	O
the	O
53-rd	O
bit	O
to	O
the	O
right	O
of	O
the	O
binary	O
point	O
is	O
a	O
1	O
and	O
is	O
followed	O
by	O
other	O
nonzero	O
bits	O
,	O
the	O
round-to-nearest	O
rule	O
requires	O
rounding	B-Algorithm
up	O
,	O
that	O
is	O
,	O
add	O
1	O
bit	O
to	O
the	O
52-nd	O
bit	O
.	O
</s>
<s>
Now	O
the	O
roundoff	B-Algorithm
error	I-Algorithm
can	O
be	O
calculated	O
when	O
representing	O
with	O
.	O
</s>
<s>
from	O
the	O
right	O
tail	O
and	O
then	O
added	O
in	O
the	O
rounding	B-Algorithm
step	O
.	O
</s>
<s>
Thus	O
,	O
the	O
roundoff	B-Algorithm
error	I-Algorithm
is	O
.	O
</s>
<s>
The	O
machine	B-Algorithm
epsilon	I-Algorithm
can	O
be	O
used	O
to	O
measure	O
the	O
level	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
when	O
using	O
the	O
two	O
rounding	B-Algorithm
rules	O
above	O
.	O
</s>
<s>
The	O
first	O
definition	O
of	O
machine	B-Algorithm
epsilon	I-Algorithm
is	O
used	O
here	O
.	O
</s>
<s>
Let	O
where	O
,	O
and	O
let	O
be	O
the	O
floating-point	B-Algorithm
representation	I-Algorithm
of	O
.	O
</s>
<s>
Note	O
that	O
the	O
first	O
definition	O
of	O
machine	B-Algorithm
epsilon	I-Algorithm
is	O
not	O
quite	O
equivalent	O
to	O
the	O
second	O
definition	O
when	O
using	O
the	O
round-to-nearest	O
rule	O
but	O
it	O
is	O
equivalent	O
for	O
round-by-chop	O
.	O
</s>
<s>
Even	O
if	O
some	O
numbers	O
can	O
be	O
represented	O
exactly	O
by	O
floating-point	B-Algorithm
numbers	I-Algorithm
and	O
such	O
numbers	O
are	O
called	O
machine	O
numbers	O
,	O
performing	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
may	O
lead	O
to	O
roundoff	B-Algorithm
error	I-Algorithm
in	O
the	O
final	O
result	O
.	O
</s>
<s>
Machine	O
addition	O
consists	O
of	O
lining	O
up	O
the	O
decimal	O
points	O
of	O
the	O
two	O
numbers	O
to	O
be	O
added	O
,	O
adding	O
them	O
,	O
and	O
then	O
storing	O
the	O
result	O
again	O
as	O
a	O
floating-point	B-Algorithm
number	I-Algorithm
.	O
</s>
<s>
The	O
addition	O
itself	O
can	O
be	O
done	O
in	O
higher	O
precision	B-Architecture
but	O
the	O
result	O
must	O
be	O
rounded	B-Algorithm
back	O
to	O
the	O
specified	O
precision	B-Architecture
,	O
which	O
may	O
lead	O
to	O
roundoff	B-Algorithm
error	I-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
adding	O
to	O
in	O
IEEE	O
double	O
precision	B-Architecture
as	O
follows	O
,	O
This	O
is	O
saved	O
as	O
since	O
round-to-nearest	O
is	O
used	O
in	O
IEEE	O
standard	O
.	O
</s>
<s>
Therefore	O
,	O
is	O
equal	O
to	O
in	O
IEEE	O
double	O
precision	B-Architecture
and	O
the	O
roundoff	B-Algorithm
error	I-Algorithm
is	O
.	O
</s>
<s>
This	O
example	O
shows	O
that	O
roundoff	B-Algorithm
error	I-Algorithm
can	O
be	O
introduced	O
when	O
adding	O
a	O
large	O
number	O
and	O
a	O
small	O
number	O
.	O
</s>
<s>
The	O
shifting	O
of	O
the	O
decimal	O
points	O
in	O
the	O
mantissas	O
to	O
make	O
the	O
exponents	O
match	O
causes	O
the	O
loss	O
of	O
some	O
of	O
the	O
less	O
significant	B-Architecture
digits	I-Architecture
.	O
</s>
<s>
The	O
loss	O
of	O
precision	B-Architecture
may	O
be	O
described	O
as	O
absorption	O
.	O
</s>
<s>
Note	O
that	O
the	O
addition	O
of	O
two	O
floating-point	B-Algorithm
numbers	I-Algorithm
will	O
result	O
in	O
a	O
roundoff	B-Algorithm
error	I-Algorithm
when	O
their	O
sum	O
is	O
an	O
order	O
of	O
magnitude	O
greater	O
than	O
that	O
of	O
the	O
larger	O
of	O
the	O
two	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
a	O
normalized	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
with	O
base	O
and	O
precision	B-Architecture
.	O
</s>
<s>
There	O
is	O
a	O
roundoff	B-Algorithm
error	I-Algorithm
of	O
.	O
</s>
<s>
Thus	O
roundoff	B-Algorithm
error	I-Algorithm
will	O
be	O
involved	O
in	O
the	O
result	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
a	O
normalized	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
with	O
the	O
base	O
and	O
the	O
mantissa	O
digits	O
are	O
at	O
most	O
.	O
</s>
<s>
The	O
roundoff	B-Algorithm
error	I-Algorithm
would	O
be	O
.	O
</s>
<s>
In	O
general	O
,	O
the	O
quotient	O
of	O
2p-digit	O
mantissas	O
may	O
contain	O
more	O
than	O
p-digits.Thus	O
roundoff	B-Algorithm
error	I-Algorithm
will	O
be	O
involved	O
in	O
the	O
result	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
normalized	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
above	O
is	O
still	O
being	O
used	O
,	O
then	O
but	O
.	O
</s>
<s>
For	O
example	O
,	O
subtracting	O
from	O
in	O
IEEE	O
double	O
precision	B-Architecture
as	O
follows	O
,	O
This	O
is	O
saved	O
as	O
since	O
round-to-nearest	O
is	O
used	O
in	O
IEEE	O
standard	O
.	O
</s>
<s>
Therefore	O
,	O
is	O
equal	O
to	O
in	O
IEEE	O
double	O
precision	B-Architecture
and	O
the	O
roundoff	B-Algorithm
error	I-Algorithm
is	O
.	O
</s>
<s>
When	O
the	O
leading	B-Architecture
digits	I-Architecture
are	O
cancelled	O
,	O
the	O
result	O
may	O
be	O
too	O
small	O
to	O
be	O
represented	O
exactly	O
and	O
it	O
will	O
just	O
be	O
represented	O
as	O
.	O
</s>
<s>
For	O
example	O
,	O
let	O
and	O
the	O
second	O
definition	O
of	O
machine	B-Algorithm
epsilon	I-Algorithm
is	O
used	O
here	O
.	O
</s>
<s>
However	O
,	O
in	O
the	O
floating-point	B-Algorithm
number	I-Algorithm
system	I-Algorithm
,	O
.	O
</s>
<s>
Although	O
is	O
easily	O
big	O
enough	O
to	O
be	O
represented	O
,	O
both	O
instances	O
of	O
have	O
been	O
rounded	B-Algorithm
away	O
giving	O
.	O
</s>
<s>
There	O
is	O
not	O
much	O
faith	O
in	O
the	O
accuracy	O
of	O
the	O
value	O
because	O
the	O
most	O
uncertainty	O
in	O
any	O
floating-point	B-Algorithm
number	I-Algorithm
is	O
the	O
digits	O
on	O
the	O
far	O
right	O
.	O
</s>
<s>
This	O
is	O
closely	O
related	O
to	O
the	O
phenomenon	O
of	O
catastrophic	B-Algorithm
cancellation	I-Algorithm
,	O
in	O
which	O
the	O
two	O
numbers	O
are	O
known	O
to	O
be	O
approximations	O
.	O
</s>
<s>
Errors	O
can	O
be	O
magnified	O
or	O
accumulated	O
when	O
a	O
sequence	O
of	O
calculations	O
is	O
applied	O
on	O
an	O
initial	O
input	O
with	O
roundoff	B-Algorithm
error	I-Algorithm
due	O
to	O
inexact	O
representation	O
.	O
</s>
<s>
The	O
amount	O
of	O
error	O
in	O
the	O
result	O
depends	O
on	O
the	O
stability	B-Algorithm
of	I-Algorithm
the	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Roundoff	B-Algorithm
error	I-Algorithm
will	O
be	O
magnified	O
by	O
unstable	O
algorithms	O
.	O
</s>
<s>
The	O
roundoff	B-Algorithm
error	I-Algorithm
is	O
amplified	O
in	O
succeeding	O
calculations	O
so	O
this	O
algorithm	O
is	O
unstable	O
.	O
</s>
<s>
Even	O
if	O
a	O
stable	O
algorithm	O
is	O
used	O
,	O
the	O
solution	O
to	O
a	O
problem	O
may	O
still	O
be	O
inaccurate	O
due	O
to	O
the	O
accumulation	O
of	O
roundoff	B-Algorithm
error	I-Algorithm
when	O
the	O
problem	O
itself	O
is	O
ill-conditioned	B-Algorithm
.	O
</s>
<s>
The	O
condition	B-Algorithm
number	I-Algorithm
of	O
a	O
problem	O
is	O
the	O
ratio	O
of	O
the	O
relative	O
change	O
in	O
the	O
solution	O
to	O
the	O
relative	O
change	O
in	O
the	O
input	O
.	O
</s>
<s>
A	O
problem	O
is	O
well-conditioned	B-Algorithm
if	O
small	O
relative	O
changes	O
in	O
input	O
result	O
in	O
small	O
relative	O
changes	O
in	O
the	O
solution	O
.	O
</s>
<s>
Otherwise	O
,	O
the	O
problem	O
is	O
ill-conditioned	B-Algorithm
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
problem	O
is	O
ill-conditioned	B-Algorithm
if	O
its	O
condition	B-Algorithm
number	I-Algorithm
is	O
"	O
much	O
larger	O
"	O
than	O
1	O
.	O
</s>
<s>
The	O
condition	B-Algorithm
number	I-Algorithm
is	O
introduced	O
as	O
a	O
measure	O
of	O
the	O
roundoff	B-Algorithm
errors	I-Algorithm
that	O
can	O
result	O
when	O
solving	O
ill-conditioned	B-Algorithm
problems	O
.	O
</s>
