Description
• Write your name, ID#, and Section number clearly in the very front page.
• Write all answers sequentially.
• Start answering a question (not the pat of the question) from the top of a new page.
• Write legibly and in orderly fashion maintaining all mathematical norms and rules. Prepare a single solution file.
1. In the classes, we discussed three forms of floating number representations as shown below,
Lecture Note Form :, (1)
Normalized Form :(2)
Denormalized Form : F = ±(0.1d1d2d3 ···dm)β βe ,, (3)
where di,β,e ∈ Z, 0 ≤ di ≤ β − 1 and emin ≤ e ≤ emax. Now, let’s take, β = 2, m = 4 and −3 ≤ e ≤ 6. Based on these, answer the following:
(a) (3 marks) What are the maximum numbers that can be stored in the system by the three forms defined above?
(b) (3 marks) What are the non-negative minimum numbers that can be stored in the system by the three forms defined above?
(c) (4 marks) Using Eq.(1), find all the decimal numbers for e = −1, plot them on a real line and show if the number line is equally spaced or not.
2. Let β = 2, m = 4, emin = −1 and emax = 2. Answer the following questions:
(a) (2 marks) Compute the minimum of |x| for normalized form.
(b) (2 marks) Compute the Machine Epsilon value for the normalized form.
(c) (2 marks) Compute the maximum delta value for the form given in Eq.(1).
3. (5 marks) Let f(x) = ex − sin(x) + x − 1. To evaluate f(x) near zero we need to compare f(x) to the Taylor expansion of f(x) at x = 0. Evaluate the Taylor coefficients, a0, a1, a2, if we compare f(x) with degree two polynomial near zero.
4. Let f(x) = tan(x). In the following we would like to calculate the erors.
(a) (2 marks) First write down the approximate polynomial, p3(x), for the function f(x) and identify the Taylor coefficients, a0,··· ,a3.
(b) (2 marks) Compute the relative error at x = π/4 if f(x) is approximated by p3(x) polynomial.
(c) (5 marks) Use the Lagrange reminder form to evaluate the upper bound of the error for some ξ ∈ [0,π/4].
Motto: Mathematics is NOT difficult, but what is difficult is to believe that mathematics is NOT difficult.
Reviews
There are no reviews yet.