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

Quiz 01

Sep 29, 2020.

1. How many bits does it take to store a binary floating point number of the form ±1.a_{1}a_{2} ⋯ a_{t} × 2^{e} with t = 10, a_{j} ∈ {0, 1}, −14 ≤ e ≤ 15? What is the distance from 1.0 to the the nearest floating number? Explain.

2. Suppose that if fl(y) is a k-digit rounding approximation to y. Show that

|\frac{y − fl(y)}{y}| ≤ 5 × 10^{−k}

Remark: A k-digit rounding means, given y = ±0.d_{1}d_{2} ⋯ d_{k}d_{k+1} ⋯ × 10^{n}, 0 ≤ d_{i} ≤ 9, d_{1} > 0, then fl(y) is obtained by changing d_{k} to d̃_{k} according to the value of d_{k+1}.

3. We showed in class the estimate of relative error resulted from x × y in terms of ε_{M}. Derive the corresponding result for x/y, y ≠ 0.

4. Solve for x^{2} − 2100x + 1 = 0 to 15 correct digits using standard double precision arithmetic. Explain how you find your answer (No explanation, no points).

5. Let A = {(x − 100)^{2} + y^{2} < (40π)^{2}}, and B = {x + y > 50.1}. Find the number of grid points (i, j) (i, j are integers) in A ∩ B. Write down the answer and name your code by your student ID number.

Quiz 01

Sep 29, 2020.

1. How many bits does it take to store a binary floating point number of the form ±1.a_{1}a_{2} ⋯ a_{t} × 2^{e} with t = 10, a_{j} ∈ {0, 1}, −14 ≤ e ≤ 15? What is the distance from 1.0 to the next larger floating number? Explain.

2. Suppose that if fl(y) is a k-digit rounding approximation to y. Show that

|\frac{y − fl(y)}{y}| ≤ 5 × 10^{−k}

Remark: A k-digit rounding means, given y = ±0.d_{1}d_{2} ⋯ d_{k}d_{k+1} ⋯ × 10^{n}, 0 ≤ d_{i} ≤ 9, d_{1} > 0, then fl(y) is obtained by changing d_{k} to d̃_{k} according to the value of d_{k+1}.

3. We showed in class the estimate of relative error resulted from x × y in terms of ε_{M}. Derive the corresponding result for x/y, y ≠ 0.

4. Solve for x^{2} − 2100x + 1 = 0 to 15 correct digits using standard double precision arithmetic. Explain how you find your answer (No explanation, no points).

5. Let A = {(x − 100)^{2} + y^{2} < (40π)^{2}}, and B = {x + y > 50.1}. Find the number of grid points (i, j) (i, j are integers) in A ∩ B. Write down the answer and name your code by your student ID number.