
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















Data^
Errors: Human^
error Bad^ MeasurementsModeling
Errors: Wrong^
formula Incorrect assumptionIncorrect
assumption Implementation
Errors: 1999 Mars
Orbiter
lost^ as^
Lockheed
Martins
programmed
using
English units^ but
NASA^ used
metric
units.
-^ Floating
Point
numbers
(with
a^ decimal
and
exponent)
are^ stored
in^ three
pieces
-^ sign^
(0^ or^ 1)
-^ mantissa
or^ significand (value)
-^ exponent or magnitude–^ exponent or
magnitude
-^ Example
would
be^ written
as
(we^
say^ it
is^ normalized)
-^ sign^
0 as^ is^ positive
-^ mantissa
or^ significand (value)
is^.
-^ exponent
5
-^ The
precision
is^ the
number
of^ significant
digits
(^5) • 10 =^100000 (^4) • 10 =^10000 (^3) • 10 =^1000 (^2) • 10 =^
100 (^1) • 10 =^
10 (^0) • 10 =^
1 (anything
to^ the
zero^ power
is^ 1)
‐ • 10 1 =^
.^
(^1) 1/ (one
tenth)
‐ • 10 2 =^
.^
(^2) 1/ (one
hundredth)
‐ • 10 3 =^
.^
(^3) 1/ (one
thousandth)
‐ • 10 4 =^
.
(^4) 1/ (one
ten^ thousandth)
-^874200 •^ In^ normali
zed^ form,
what
is^ the
precision,
magnitude
In normali ed form, what is the precision, magnitude and^ exponent? • 874200
(^6) x 10
-^ what is the precision
= 4 digits of accuracy
what
is^ the
precision
4 digits
of^ accuracy
-^ magnitude
-^ mantissa
mantissa
In^ a^ poorly
organized
long^
computation,
representation
errors
can^ accumulate,
culminating
in^ a^ floating
point
result
with a^ large
error.
For^ example,
a^ sum
of^ n
floating
point
numbers
can^ have
an^ error
as^ high
as
(^32) ‐ (^32) 2 (^) n2. Errors^ in^ small
differences
can^ also
cause
problems.
For
example,
an^ algorithm
that^
computes
‐B)^ may
give
a^ divideby
zero error if A and B are within 2
‐^32 of each
a^ divideby
‐zero error
if^ A^ and
B^ are
within
32 2 of each
other.
-^ When
you^ add
two^ numbers
that^
each^
have^
error,
what
is^ the
uncertainty
of^ the
sum?
-^ When
you^ multiply
two^ numbers
that^
each^
have
error,
what
is^ the
uncertainty
of^ the
product?
-^ Absolute
error:
the^ absolute
value
(throw
away
sign)
of^ the
difference
between
the^ exact
and^ the
computed
answer Example:
Area
of^ a^ polygon
is^ actually
272 square
pixels.
We^ estimated
What
is^ the
absolute
error?^ |
-^ If^ I^
am^ off
by^175
out^ of
or^ if^
I^ am^ off
by^122
out
of^ 272? • Relative
error
divides
the^ absolute
error
by^ the
actual y
answer. • 175/
or^ 3.8%
error
or^ 44.8%
error
-^874200 •^ In^ normali
zed^ form,
what
is^ the
precision,
In normali ed form, what is the precision, magnitude
and^ exponent?
-^874200
(^6) x 10
-^ what is the
desired
precision
= 3 digits of accuracy
what
is^ the
desired
precision
3 digits
of^ accuracy
-^ magnitude
-^ mantissa
= 874 (after truncation) mantissa
(after
truncation)
-^ Instead
of^ truncating
a^ number
to^ fit
in^ storage,
the
computer
might
round
-^874600 •^ In^ normalized
form,
what
is^ the
precision,
magnitude
p^
,^ g
and^ exponent
rounded
to^ three
digits.
(^6) x 10
-^ what
is^ the
precision
=^3 digits
of^ accuracy
p^
g^
y
-^ magnitude
-^ mantissa
= .875 (after rounding) mantissa
(after
rounding)
-^ The
error
between
what
you^ wanted
to^ store
and
what
you^ actually
could
store.
-^ Actually
“regular
error”
when
you^ are
rounding.
-^ In^ binary,
these
same
kinds^
of^ problems
occur.
-^ Suppose
we^ have
a^ simple
integer
(with^
no^ fractional
part)
and that we have 4 bits for each integer.and^ that
we^ have
4 bits
for^ each
integer.
-^ Now
lets^ add
two^ numbers 1101
(13^ in^
decimal)
(13 i
d^ i
l)
(^
in^ decimal) 11010
(but, we^ have overflowed
our^ memory
as^ we
have^ a
four^ bit
limit) 0 0 i^
ll h^
ill b^
d ( 3^
3 0)
1010 i
s^ all^ that
will^ b e^ stored
(13+
=^ 10)
You^ ask
doesn’t
the^ machine
check
for^ the
error^
and^ warn
you.Well,^ it^ could,
but^ it
would
slow^ things
down.
Every
operation
would
be^ followed
by^ a^ check
to^ see
if^ overflowed.
We^ call
this^ “overkill”.
1.^ Suppose
we^ have
four^
digits
of^ accuracy.
is^ stored
as^157800
(^6) x 10
2.^ If^
we^ add
a^ small
number
to^ it,
we^ get
(with
four^
digits
of^ accuracy)
3.^ We
may^
be^ “fine”
with that,
but^ if
we^ add
the^ small
b^
illi^
i^
i d^
i h^
h
number
a^ million
times,
it^ doesn’t
seem
right
that
the^ original
number
never
changes.
We call this error propagation or cumulative error
It
We^ call
this^ error
propagation
or^ cumulative
error
.^ It
started
out^ small,
but^ after
repeated
additions,
it
had^ become
significant.
-^ From
Law…cumulative
error
is^ premised
on^ the
existence
of^ errors,
no^ one
of^ which
merits
reversal,
but^ in
combination
they necessitate
the^ reversal
of^ a
finding
or^ sentence;
-^ In^ navigation,
a^ 1%
error
in^ direction
becomes
significant
if^ you
are^ flying
miles.