You are on page 1of 4

Ministry of Education of the Republic of Moldova

Technical University of Moldova

Department of Software Engineering and Automatics

REPORT
Laboratory work No. 1
Methods for Evaluation of the Errors

Chisinau 2018
Problem
Number 𝑥 = 0.10834
Find: 1. 𝑥, 𝑥1 ≈ 𝑥, ∆𝑎, 𝛿𝑎

2. z, a, b, c

3. Underflow/overflow errors in calculations

I. Let 𝑥 = 0.10834

𝑥 = 0.108.

Let calculate the absolute error:

∆𝑥1 = |𝑥 − 𝑥1 | = |0.10834 − 0.108| = .00034

∆𝑥1 = .0004

The relative error is:

∆𝑥1 0.0004
𝛿𝑥1 = = = 0.003703 ≈ 0.004
|𝑥1 | 0.108

𝐸𝑝 = 100 × 𝛿𝑥1 = 100 × 0.004 = 0.4%

II. Calculate:

𝑐 + sin 𝑏
𝑎 = 0.3107; 𝑏 = 13.27; 𝑐 = 4.711; 𝑧 =
𝑐 − 𝑎2

a b c sinb a^2 c+sinb c-a^2 z


0.3107 13.27 4.711 0.2296 0.09653 4.940 апр.44 1.070

Calculate 𝑎2 :

(0.3107)2 = 0.09653449 ≈ 0.0965𝟑

Calculate sin 𝑏:

sin 𝑏 = sin(13.27) = 0.2295401504

Estimate the derivative:

(sin 𝑏)` = cos 𝑏 = cos(13.27) = 0.9732991931 < 100

Thus sin b=0.2296

Calculate 𝑐 − 𝑎2 :

4.711-0.09653=4.61447≈4.6144
Calculate c+sinb:

4.711+0.2296=4.9406≈ 4.94𝟎

Calculate z:

𝑐 + sin 𝑏 4.94𝟎
𝑧= 2
= = 1.07056172 ≈ 1.07𝟎
𝑐−𝑎 4.614𝟒
z=1.07

a b c sinb a^2 c+sinb c-a^2 z


0.3107 13.27 4.711 0.2296 0.09653 4.940 4.6144 1.070
∆(c-
∆(a) ∆(b) ∆(c) ∆(sinb) ∆(a^2) ∆(c+sinb) ∆(z)
a^2)
0.00005 0.005 0.0005 0.0050 0.0000311 0.006 0.0006 0.0014

Calculate:

△ (sin 𝑏) = |(sin 𝑏)`| ∙△ 𝑏 = 0.9732991931 ∙ 0.005 = 0.004866495966 ≈ 0.0050

∆(𝑎2 ) = 𝑎∆𝑎 + 𝑎∆𝑎 = 2𝑎∆𝑎 = 2 ∙ 0.3107 ∙ 0.00005 = 0.00003107 ≈ 0.0000311

∆(𝑐 + sin 𝑏) = ∆(𝑐) + ∆(𝑠𝑖𝑛𝑏) = 0.0005 + 0.0050 = 0.0055 ≈ 0.006

∆(𝑐 − 𝑎2 ) = ∆(𝑐) + ∆(𝑎2 ) = 0.0005 + 0.0000311 = 0.0005311 ≈ 0.0006

𝑐 + sin 𝑏 (𝑐 + sin 𝑏)∆(𝑐 − 𝑎2 ) + (𝑐 − 𝑎2 )∆(𝑐 + sin 𝑏)


𝑧= => ∆(𝑧) = = 0.00131511535
𝑐 − 𝑎2 (𝑐 − 𝑎2 )2
≈ 0.0014

III. Underflow/overflow errors in calculations

a b c sinb a^2 c+sinb c-a^2 z


0.3107 13.27 4.711 0.2296 0.09653 4.940 1.070
Underflo 13.265 4.7105 0.22945 0.096503 4.93995 4.6131 1.0704
0.1065
w error
Overflow 0.3107 13.27 4.711 0.2296 0.09656 4.9411 4.614 1.071
error 5 5 5 2 5 2 9 1
Calculate:

1. 𝑈𝑎 = 𝑎 − ∆𝑎 = 0.3107 − 0.00005 = 0.31065


𝑂𝑎 = 𝑎 + ∆𝑎 = 0.3107 + 0.00005 = 0.31075
2. 𝑈𝑏 = 𝑏 − ∆𝑏 = 13.27 − 0.005 = 13.265
𝑂𝑏 = 𝑏 + ∆𝑏 = 13.27 + 0.005 = 13.275
3. 𝑈𝑐 = 𝑐 − ∆𝑐 = 4.711 − 0.0005 = 4.7105
𝑂𝑐 = 𝑐 + ∆𝑐 = 4.711 + 0.0005 = 4.7115
4. 𝑈sin 𝑏 = sin(𝑈𝑏 ) = sin(13.265) = 0.2294552132 ≈ 0.2294𝟓
𝑂sin 𝑏 = sin(𝑂𝑏 ) = sin(13.275) = 0.2296250859 ≈ 0.2296𝟐
5. 𝑈𝑎2 = 𝑈𝑎 ∙ 𝑈𝑎 = 0.31065 ∙ 0.31065 = 0.0965034225 ≈ 0.09650𝟑
𝑂𝑎2 = 𝑂𝑎 ∙ 𝑂𝑎 = 0.31075 ∙ 0.31075 = 0.0965655625 ≈ 0.09656𝟓
6. 𝑈(𝑐+sin 𝑏) = 𝑈𝑐 + 𝑈sin 𝑏 = 4.7105 + 0.2294𝟓 = 4.939𝟗𝟓
𝑂(𝑐+sin 𝑏) = 𝑂𝑐 + 𝑂sin 𝑏 = 4.7115 + 0.2296𝟐 = 4.941𝟏𝟐
7. 𝑈(𝑐−𝑎2 ) = 𝑈𝑐 + 𝑈𝑎2 = 4.7105 − 0.09650𝟑 = 4.613997 ≈ 4.613𝟏
𝑂(𝑐−𝑎2 ) = 𝑂𝑐 + 𝑂𝑎2 = 4.7115 − 0.09656𝟓 = 4.614935 ≈ 4.614𝟗
𝑂(𝑐+sin 𝑏) 4.939𝟗𝟓
8. 𝑂𝑧 = = = 1.071106198 ≈ 1.071𝟏
𝑈(𝑐−𝑎2 ) 4.614𝟗

𝑈(𝑐+sin 𝑏) 4.939𝟗𝟓
𝑈𝑧 = = = 1.070434896 ≈ 1.070𝟒
𝑂(𝑐−𝑎2 ) 4.614𝟗

DISCUSSION:

𝑧 = 1.070; 𝑧1 ≈ 1.071

∆𝑧1 = |𝑧 − 𝑧1 | = 0.001

𝑧 = 1.07 ± 0.001
1.0704 ≤ 𝑧 ≤ 1.0711
∆𝑧1 0.001
𝛿= × 100% = × 100% = 0.09345% ≈ 0.0935%
𝑧 1.070

You might also like