

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!


AMSC/CMSC 460 Quiz 1 , Fall 2007
For this page of the quiz, assume you have a base 2 computer that stores floating point numbers using a 5 bit normalized mantissa (x.xxxx), a 4 bit exponent, and a sign for each. Assume that all numbers are chopped rather than rounded.
x = 1; for j=1:2^ (20), x = x + delta; end
For the computer specified above, what is the largest value of delta for which the final value of x is 1? Explain your reasoning.
Answer: Since this machine only stores 5 bits, the machine number just greater than 1 is 1. 00012 = 1 + 1/16.
In the first iteration of the loop, if delta = 1/16, then x will change from 1 to 1. 00012.
If delta is any number between 0 and 1/16, then (because of chopping), x will not change its value.
So x is constant for any positive number less than 1/16.
The largest machine-representable number less than 1/16 is
(a) (5) What is the relative error in the values x 1 = .85, x 2 = −.85 as approximations to the two solutions to the equation?
Answer: The two relative errors are equal: ∣ ∣ ∣ ∣
(b) (5) Give a backward error bound for x 1 = .91, x 2 = −.91 as approxima- tions to the two solutions to the equation.
Answer: For backward error, we report a bound on the distance between the problem we solved and the problem we wanted to solve. We have solved the problem x^2 − (.91)^2 = 0,
when we wanted to solve the problem
x^2 − .81 = 0,
so we have changed the constant term in the polynomial by
. 81 − (.91)^2.