SC
SC
Q-2 Let x = 3.141592653589793 is the value of the constant ratio π correct to 15 decimal places
and x ∗ = 3.14159265 be an approximation of x. Compute the following quantities:
approximate value of x a=3.14159265
(a.)The error
error = |x−¿ x4|
error= |3.1415926589793−3.14159265 |
error= 0.000000035979
(b.) The absolute error
Absolute error =|x−x |
Ae=|3.1415926589793 −3.1415926 |
Ae = 0.00000000359779
(c.) The relative error
Relative error = absolute error/x
Re=0.00000000358979/3.1415926589793
Re=0.000000001142666
Q-3 Approximate the following decimal numbers to three digits by using rounding and chopping
(truncation) rules:
(1.)x1 = 1.34579
X = 1.34579 r.o→x=1.346 T→x=1.345
(2.) x2 = 1.34679
X = 1.34679 r.o→x=1.347 T→x=1.346
(3). x3 = 1.34479
X = 1.34479 r.o→x=1.345 T→x=1.3411
(4.) x4 = 3.34379
X = 3.34379 r.o→x=3.344 T→x=3.343
(5.) x5 = 2.34579
X = 2.34579 r.o→x=2.346 T→x=2.345
Q-6 If y = 𝑥 find the error in y for (i) x = 3 and (ii) x = 5 given the error in x as 0.05
using differential calculation.
error x1 = |xa - x|
= |1.7321 – 0.05|
Error x1 = 1.6821
Error x2 = |xb- x|
=|2.2361 – 0.05|
Error x2 = 2.1861
Q-7 (i) Let x = 0.005998. Find the relative error if x is truncated to 3 decimal digits.
x= 0.005098 xa = 0.005
relative error = |x-xa| |x
relative error = |0.005998 – 0.055| 0.005998
relative error = 0.166
(ii) Let x = 0.00458529. Find the absolute error if x is rounded off to 3 decimal digits.
Absolute error = |x - xa|
Absolute error = 0.0004
Q-8 (i) Divide 0.8888E5 by 0.2000E3
0.8888 / 0.2000 × E05 -E03
4.444 E02
0.4444 E03
(ii) Multiply 0.1234E5 by 0.1111E3
0.1234 ×0.1111 × E05 + E03
0.13709 E08
0.1317 E07
(iii) Subtract 0.7200E – 99 from 0.7734E – 99
0.7734 E-99 –0.7200 E-99
0.0534 E-99
0.5340 E-98
(iv) Add 0.5554E99 to 0.7463E99
0.5554 + 07463 E99
0.5554 E99
0.1302 E100 overflow