Professional Documents
Culture Documents
02 ErrorAnalysis
02 ErrorAnalysis
Samir Moustafa
University of Vienna
▶ Review
▶ Machine Epsilon
▶ Standard Model of Floating Point Arithmetic
▶ Equivalently,
fl(x) = x(1 + δ) , |δ| ≤ εm
An alternative definition:
▶ εm is the smallest number ϵ satisfying fl(1 + ϵ) > 1
with x, y ∈ M and op = +, −, ·, /
▶ We want to derive error bounds for a computed ŝ, using the model
introduced
▶ The order of evaluation is important for the analysis (and may also
affect the result) → assume it to be from left to right
▶ It follows that
ŝ1 = fl(x1 y1 ) = x1 y1 (1 + δ1 )
ŝ2 = fl(ŝ1 + x2 y2 ) = (ŝ1 + x2 y2 (1 + δ2 ))(1 + δ3 )
= (x1 y1 (1 + δ1 ) + x2 y2 (1 + δ2 ))(1 + δ3 )
= x1 y1 (1 + δ1 )(1 + δ3 ) + x2 y2 (1 + δ2 )(1 + δ3 )
1 + δi ≡ 1 ± δ
with 0 ≤ δ ≤ εm
▶ Therefore,
▶ Overall, we have
where
nεm
|θn | ≤ =: γn
1 − nεm
▶ Note the assumptions!
where “|x|” denotes the vector with elements |xi | and inequalities
between vectors hold componentwise.
▶ This yields an absolute forward error bound
n
X
|x⊤ y − fl(x⊤ y)| ≤ γn |xi yi | = γn |x|⊤ |y|
i=1
0.001
10-6
10-9
10-12
10-15
Concluding remarks: