
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Math 685/CSI 700/OR 682 Homework 2 given 02/05/
Suggested reading: Heath, Chapters 1,
Problem 1. It is good to know your limits. For your computer system find: (a) the largest possible floating-point number; (b) the largest integer I s.t. (I + 1) − 1 equals I; (c) the smallest possible positive floating-point number; (d) the smallest positive floating-point number x s.t. (1 + x) − 1 6 = 0; (e) the largest N × N matrix allowed by memory; (f) the longest row vector allowed by memory; (g) the maximum number of array dimensions allowed, e.g. a(i, j, k) is 3- dimensional array.
Problem 2. For your computer system, write a program to estimate the number of floating- point operations (e.g. multiplications) that can be performed in one second. In MATLAB, timing commands tic, tac, etime, clock might be useful.
Problem 3. Consider the problem of evaluating the function sin(x) focusing on the propa- gated data error, i.e. the error in the function value due to a perturbation h in the argument x. (a) Estimate the absolute and relative error in evaluating sin(x) (b) Estimate the condition number of this problem (c) For what values of the argument x is this problem highly sensitive?
Problem 4. Assume that you are solving the quadratic equation ax^2 + bx + c = 0 with a = 1. 22 , b = 3.34 and c = 2.28 using a normalized floating-point system with β = 10, p = 3. (a) What is the computed value of the discriminant b^2 − 4 ac? (b) What is the correct value of the discriminant in the real (exact) arithmetic? (c) What is the relative error in the computed value of the discriminant?
Problem 5. Rewrite the following expressions in stable form to avoid loss of significance. Indicate for which values there is a difficulty and try not to use Taylor series if possible.
(1)
sin(x) x −
x^2 − 1
x + 2 −
x; (3) 1 − sin(x); (4)
e^2 x^ − 1 2 x