Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

numerical analysis complete notes, Lecture notes of Numerical Methods in Engineering

numerical analysis complete notes

Typology: Lecture notes

2016/2017

Uploaded on 09/23/2017

himanshu-jain
himanshu-jain 🇮🇳

4

(1)

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
School of Mathematics, Thapar University, Patiala
UMA032 : Numerical and Statistical Methods
Assignment 1
Floating Point Arithmetic and Errors
1. Find the absolute, percentage, and relative errors if x= 0.005998 is chopped and rounded to three decimal
digits.
2. Round-off the following numbers correct to four significant figures: 58.3643, 979.267, 7.7265, 56.395, 0.065738
and 7326853000.
3. The following numbers are given in a decimal computer with a four digit normalized mantissa: A= 0.4523e
4, B= 0.2115e3, and C= 0.2583e1. Perform the following operations, and indicate the error in the result,
assuming symmetric rounding: (i) (A+B) + C(ii) AB(iii) A/C (iv) (AB)/C.
4. The error in the measurement of area of a circle is not allowed to exceed 0.5%. How accurately the radius
should be measured.
5. Calculate the sum of 3, 5, and 7 to four significant digits and find its absolute and relative errors.
6. Find the relative error in taking the difference of numbers 5.5=2.345 and 6.1=2.470.Numbers should
be correct to four significant figures.
7. Find the relative error in calculation of 7.342
0.241, where numbers 7.342 and 0.241 are correct to three decimal
places. Determine the smallest interval in which true result lies.
8. Associative and distributive laws are not always valid in case of normalized floating-point representation.
Let a= 0.5555e1, b= 0.4545e1, c = 0.4535e1. Show that
a(bc)6=ab ac.
Further let a= 0.5665e1, b= 0.5556e1, c= 0.5644e1. Show that
(a+b)c6= (ac) + b.
9. Find the root of smallest magnitude of the equation x2400x+ 1 = 0 using quadratic formula. Work in
floating-point arithmetic using a four-decimal place mantissa.
10. Calculate the value of x2+ 2x2 and (2x2) + x2where x= 0.7320e0, using normalized point arithmetic
and proves that they are not the same. Compare with the value of (x22) + 2x.
11. (i) Consider the stability (by calculating the condition number) of 1 + x1 when xis near 0. Rewrite the
expression to rid it of subtractive cancellation.
(ii) Rewrite excos xto be stable when xis near 0.
12. Suppose that a function f(x) = ln(x+ 1) ln(x),is computed by the following algorithm for large values of
xusing six digit rounding arithmetic
x0: = x= 12345
x1: = x0+ 1
x2: = ln x1
x3: = ln x0
f(x) := x4: = x2x3.
By considering the condition κ(x3) of the subproblem of evaluating the function, show that such a function
evaluation is not stable. Also propose the modification of function evaluation so that algorithm will become
stable.

Partial preview of the text

Download numerical analysis complete notes and more Lecture notes Numerical Methods in Engineering in PDF only on Docsity!

School of Mathematics, Thapar University, Patiala

UMA032 : Numerical and Statistical Methods Assignment 1 Floating Point Arithmetic and Errors

  1. Find the absolute, percentage, and relative errors if x = 0.005998 is chopped and rounded to three decimal digits.
  2. Round-off the following numbers correct to four significant figures: 58.3643, 979.267, 7.7265, 56.395, 0. and 7326853000.
  3. The following numbers are given in a decimal computer with a four digit normalized mantissa: A = 0. 4523 e− 4, B = 0. 2115 e−3, and C = 0. 2583 e1. Perform the following operations, and indicate the error in the result, assuming symmetric rounding: (i) (A + B) + C (ii) A − B (iii) A/C (iv) (AB)/C.
  4. The error in the measurement of area of a circle is not allowed to exceed 0.5%. How accurately the radius should be measured.
  5. Calculate the sum of

5, and

7 to four significant digits and find its absolute and relative errors.

  1. Find the relative error in taking the difference of numbers

5 .5 = 2.345 and

6 .1 = 2. 470. Numbers should be correct to four significant figures.

  1. Find the relative error in calculation of

, where numbers 7.342 and 0.241 are correct to three decimal places. Determine the smallest interval in which true result lies.

  1. Associative and distributive laws are not always valid in case of normalized floating-point representation. Let a = 0. 5555 e1, b = 0. 4545 e1, c = 0. 4535 e1. Show that a(b − c) 6 = ab − ac. Further let a = 0. 5665 e1, b = 0. 5556 e − 1, c = 0. 5644 e1. Show that (a + b) − c 6 = (a − c) + b.
  2. Find the root of smallest magnitude of the equation x^2 − 400 x + 1 = 0 using quadratic formula. Work in floating-point arithmetic using a four-decimal place mantissa.
  3. Calculate the value of x^2 + 2x − 2 and (2x − 2) + x^2 where x = 0. 7320 e0, using normalized point arithmetic and proves that they are not the same. Compare with the value of (x^2 − 2) + 2x.
  4. (i) Consider the stability (by calculating the condition number) of

1 + x − 1 when x is near 0. Rewrite the expression to rid it of subtractive cancellation. (ii) Rewrite ex^ − cos x to be stable when x is near 0.

  1. Suppose that a function f (x) = ln(x + 1) − ln(x), is computed by the following algorithm for large values of x using six digit rounding arithmetic x 0 : = x = 12345 x 1 : = x 0 + 1 x 2 : = ln x 1 x 3 : = ln x 0 f (x) := x 4 : = x 2 − x 3. By considering the condition κ(x 3 ) of the subproblem of evaluating the function, show that such a function evaluation is not stable. Also propose the modification of function evaluation so that algorithm will become stable.