Numerical Analysis I, Fall 2014 (http://www.math.nthu.edu.tw/˜ wangwc/)

Quiz 01

Oct 07, 2014.

1. How many bits does it take to store a binary floating point number of the form ±1.a_{1}a_{2} ⋯ a_{s} × 2^{e} with s = 11, a_{j} ∈ {0, 1}, −6 ≤ e ≤ 7? Write down the binary floating number representation (a finite sequence of 0, 1) of −0.6875.

2. \underline{Derive} a upper bound for relative error cause by chopping for the floating point system in problem 1 (also known as machine epsilon).

3. Solve for x^{2} − 2100x + 1 = 0 to 15 correct digits. Explain how you find your answer (direct evaluation using ’calculator’ will receive no credits).

4. Consider the following recursive equation p_{0} = 1, p_{1} = 1/3, p_{n} = \frac{10}{3}p_{n−1} − p_{n−2}. What is the exact solution? Is it stable? Explain.

5. How many additions/subtractions and how many multiplications/divisions does it take

to evaluate \frac{1}{∑{9 \atop i=0} \frac{5^{i}}{i!}} ? Explain. Try to give the most efficient way of evaluation. Then

perform 4-digit rounding using the subroutines given on the course homepage (or your own subroutine, if you prefer). If you don’t have the most efficient way of evaluating the sum, implement your own method for partial credits. Hint: the answer is close to, but may not equal to 7.090 × 10^{−3}.

Numerical Analysis I, Fall 2014 (http://www.math.nthu.edu.tw/˜ wangwc/)

Quiz 01

Oct 07, 2014.

1. How many bits does it take to store a binary floating point number of the form ±1.a_{1}a_{2} ⋯ a_{s} × 2^{e} with s = 11, a_{j} ∈ {0, 1}, −6 ≤ e ≤ 7? Write down the binary floating number representation (a finite sequence of 0, 1) of −0.6875.

2. \underline{Derive} a upper bound for relative error cause by chopping for the floating point system in problem 1 (also known as machine epsilon).

3. Solve for x^{2} − 2100x + 1 = 0 to 15 correct digits. Explain how you find your answer (direct evaluation using ’calculator’ will receive no credits).

4. Consider the following recursive equation p_{0} = 1, p_{1} = 1/3, p_{n} = \frac{10}{3}p_{n−1} − p_{n−2}. What is the exact solution? Is it stable? Explain.

5. How many additions/subtractions and how many multiplications/divisions does it take

to evaluate \frac{1}{∑{9 \atop i=0} \frac{5^{i}}{i!}} ? Explain. Try to give the most efficient way of evaluation. Then

perform 4-digit rounding using the subroutines given on the course homepage (or your own subroutine, if you prefer). If you don’t have the most efficient way of evaluating the sum, implement your own method for partial credits. Hint: the answer is close to, but may not equal to 7.090 × 10^{−3}.