AMSC/CMSC 460 Quiz 1, Fall 2007: Largest Delta & Relative Errors in Approximations - Prof., Quizzes of Computer Science

The instructions and questions for quiz 1 in the amsc/cmsc 460 course, which was offered in fall 2007. The quiz covers topics related to computer storage of floating point numbers using a base 2 system with a 5-bit normalized mantissa, a 4-bit exponent, and a sign for each number. The questions ask about the largest delta value for a given code fragment and the relative errors and backward error bounds for approximations of the solutions to a quadratic equation.

Typology: Quizzes

Pre 2010

Uploaded on 02/13/2009

koofers-user-c6l
koofers-user-c6l 🇺🇸

5

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AMSC/CMSC 460 Quiz 1 ,Fall 2007
Show all work. You may leave arithmetic expressions in any form that
a calculator could evaluate. By putting your name on this paper, you agree
to abide by the university’s code of academic integrity in completing the
quiz. Use no books, calculators, cellphones, communication with others,
scratchpaper, etc.
Name
Student number
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.
1. (10) Consider the the following code fragment:
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 xis 1? Explain your reasoning.
1
pf2

Partial preview of the text

Download AMSC/CMSC 460 Quiz 1, Fall 2007: Largest Delta & Relative Errors in Approximations - Prof. and more Quizzes Computer Science in PDF only on Docsity!

AMSC/CMSC 460 Quiz 1 , Fall 2007

Show all work. You may leave arithmetic expressions in any form that a calculator could evaluate. By putting your name on this paper, you agree to abide by the university’s code of academic integrity in completing the quiz. Use no books, calculators, cellphones, communication with others, scratchpaper, etc.

Name

Student number

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.

  1. (10) Consider the the following code fragment:

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.

  1. Consider the equation x^2 − .81 = 0.

(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?

(b) (5) Give a backward error bound for x 1 = .91, x 2 = −.91 as approxima- tions to the two solutions to the equation.