0% found this document useful (0 votes)
50 views2 pages

S Tutorial 02

Uploaded by

Zesty Oreo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views2 pages

S Tutorial 02

Uploaded by

Zesty Oreo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Section

Tutorial Sheet 2
Arithmetic Error Analysis
1. Let X be a sufficiently large number which result in an overflow of memory on a
computing device. Let x be a sufficiently small number which result in underflow
of memory on the same computing device. Then give the output of the following
operations:
(i) x × X (ii) 3 × X (iii) 3 × x (iv) x/X (v) X/x.
2. In this question, computations are done on a computer which uses 3-digit chopping
arithmetic.
i) Compute the mid-point of the interval [0.982, 0.987]. Show all the steps of
the computation.
ii) Give a different way of computing the mid-point of [0.982, 0.987], so that the
mid-point lies in the given interval [0.982, 0.987]. Show all the steps of the
computation. Explain the differences between both these computations.
3. In the following problems, show all the steps involved in the computation.
i) Using 5-digit rounding, compute 37654 + 25.874 − 37679.
ii) Let a = 0.00456, b = 0.123, c = −0.128. Using 3-digit rounding, compute
(a + b) + c, and a + (b + c). What is your conclusion?
iii) Let a = 2, b = −0.6, c = 0.602. Using 3-digit rounding, compute a × (b + c),
and (a × b) + (a × c). What is your conclusion?
4. Consider a computing device having exponents e in the range m ≤ e ≤ M ,
m, M ∈ Z. Let n be an integer such that n ≤ |m| + 1.
i) If the device uses n-digit rounding binary floating-point arithmetic, then
show that δ = 2−n is the machine epsilon.
ii) What is the machine epsilon of the device if it uses n-digit rounding decimal
floating-point arithmetic? Justify your answer.
5. Consider a computing device that uses n-digit chopping (decimal) arithmetic. Let
fl(x) denote the floating-point approximation of a positive real number x in this
device. Prove ! !
! x − fl(x) !
! ! ≤ 10−n+1 .
! x !
6. The ideal gas law is given by P V = nRT where R is the gas constant. We are
interested in knowing the value of T for which P = V = n = 1. If R is known
only approximately as RA = 8.3143 with an absolute error at most 0.12 × 10−2 .
Obtain an upper bound for the absolute relative error in the computation of T
that results in using RA instead of R?

3
S. Sivaji Ganesh and S. Baskar Spring 2022-23
Section

7. Let xA = 3.14 and yA = 2.651 be obtained from xT and yT using 4-digit rounding.
Find the smallest interval that contains
(i) xT (ii) yT (iii) xT + yT (iv) xT − yT (v) xT × yT (vi) xT /yT .

8. Obtain the number of significant digits of xA = 0.025678 present in x = 0.025611.

9. Instead of using the true values xT = 0.62457371 and yT = 0.62457238 in cal-


culating zT = xT − yT , if we use the approximate values xA = 0.62451251 and
yA = 0.62458125, and calculate zA = xA − yA , then find the loss of significant
digits in the process of calculating zA when compared to the significant digits in
xA .

10. Let xA = 0.04078 has exactly 3 significant digits with respect to the real number
xT . Find the smallest interval in which xT lies.

11. Given x = 0.75371 and y = −0.49572. Let the product x ∗ y be computed using
3-digit rounding floating-point arithmetic. What is the absolute value of the total
error? [Give the final answer with at least 6-digits after decimal places]

12. For small values of x, the approximation sin x ≈ x is often used. Obtain a range of
1
values of x for which the approximation gives an absolute error of at most ×10−6 .
2
13. Is the process of computing the value of the function f (x) = (ex − 1)/x stable or
unstable for x ≈ 0? Justify your answer.

4
S. Sivaji Ganesh and S. Baskar Spring 2022-23

You might also like