MATH 251 Exam 1, Fall 2007
American University of Beirut · Numerical Computing · 7 pages
More MATH 251 files
Show the text of this exam
AMERICAN UNIVERSITY OF BEIRUT
Faculty of Arts and Sciences
Mathematics Department
MATH-CMPS 251
QUIZ I
FALL 2007-2008
Closed Book, One hour 15 minutes
SUBMIT THE QUESTION SHEET WITH BOOKLET
(ONLY NON-PROGRAMMABLE AND NON-GRAPHIC
CALCULATORS ARE ALLOWED)
STUDENT NAME
ID NUMBER
Problem
Out of
Grade
1
10
2
8
3
8
4
8
5
16
TOTAL
50
1
1. (10 points) Answer the following:
(a) Let x = 7.477 and y = 3.789 be 2 floating points in F = F(10, 4, −2, +2).
What is the relative Error in the computation of x ⊕ y in F?
(b) Let x = 0.3721448693 and y = 0.3720214371
What is the relative error in the computation of (flp(x) ⊖ flp(y))
in F?
2
2. (8 points) Answer the following:
(a) Let x = [94F96A0]16. Is this a hexadecimal representation of some
element in Fs? Justify your answer.
(b) In case x ∈ Fs, determine the decimal number that has this hex-
adecimal representation in Fs. Otherwise, modify x first, then find
the required decimal number.
3
3. (8 points) Loss of significant figures may result in the computation of
the following functions of the variable x for certain values of x. Specify
these values then propose alternative functions that would remedy the
loss of significant figures. (If necessary you may use Taylors series).
(a) f(x) = x −
√
x2 + 1
(b) g(x) = 1 − cos(x/2)
4
4. (8 points) Consider the polynomial p(x) = 4 + x2 + 3x4 + 2x8 − 5x16.
(a) (4 points)) Put p(x) in nested form.
(b) (4 points) Find consequently the minimum number of floating-
point operations to compute p(x).
5
5. (16 points) Let f(x) = ln(1 + x) −
1
x+1
(a) (7 points) Prove that the function f(x) has a unique positive root
r in the interval (0, 1):
• (3 points) By plotting both functions ln(1 + x) and
1
x+1
• (4 points) By studying the behaviour of f(x) and f ′(x) on
[0, ∞)
6
(b) (3 points) Apply 2 iterations of the Bisection method
• First Iteration: r1 =
• Second Iteration: r2 =
(c) (3 points) Write Newton’s method iteration formula and apply 1
iteration of the formula using r1 (found above) as initial choice.
(d) (3 points) Write the Secant method iteration formula and apply
1 iteration of the formula using r1 and r2 (found above) as initial
choice.
7