Fall 2011, CMPSC/MATH 451
Lecture 1: Aug 23, 2011
Lecture 2: Aug 25, 2011
These notes are meant to cover what’s discussed on the blackboard, and are almost entirely derived
from the textbook.
1
Error Analysis: some definitions
absolute error
= approximate value

true value
(1)
relative error
=
absolute error
true value
(2)
Consider a onedimensional problem
f
:
R
→
R
, where
x
: true input
f
(
x
) : desired true result
ˆ
x
: inexact input
ˆ
f
(ˆ
x
) : approximation to the function
total error =
ˆ
f
(ˆ
x
)

f
(
x
)
(3)
=
ˆ
f
(ˆ
x
)

f
(ˆ
x
)

{z
}
computational error
+
f
(ˆ
x
)

f
(
x
)

{z
}
propagated data error
(4)
(5)
Note that the choice of algorithm has no effect on the propagated data error.
Example.
Suppose we need to approximate the value of sin(
π/
8).
Let us first assume
π
≈
3.
Then,
π/
8 would be 3
/
8 = 0
.
3750. Further, let us approximate
sin
(
x
) to
x
, considering just the
first term in its Taylor series expansion.
The total/absolute error is
ˆ
f
(ˆ
x
)

f
(
x
) = 0
.
3750

0
.
3827 =

0
.
0077.
This is the sum of the propagated data error, which is
f
(ˆ
x
)

f
(
x
) = sin(3
/
8)

sin(
π/
8)
≈
0
.
3663

0
.
3827 =

0
.
0164, and the computational error
ˆ
f
(ˆ
x
)

f
(ˆ
x
) = 3
/
8

sin(3
/
8)
≈
0
.
3750

0
.
3663 = 0
.
0087. Note that the errors partially offset each other in this case.
Computational error can be further split up into
truncation
and
rounding
errors.
Truncation error is the difference between true result (for actual input) and the result produced
by a given algorithm using exact arithmetic.
It usually occurs due to approximations such as
truncating infinite series or terminating iterative sequences before convergence.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 staff
 Numerical Analysis

Click to edit the document details