
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Homework problems related to approximations of mathematical constants and working with floating-point numbers. Topics include computing absolute and relative errors, finding the largest interval for approximations, converting floating-point machine numbers to decimal form, and finding the most accurate approximations to the roots of quadratic equations using four-digit rounding arithmetic. Hints and formulas are provided.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

DUE : FEB/08/
The following homework are mostly from Chapter I, section 2 in your textbook.
(1) Compute the absolute error and relative error in approximations of p by p
∗
(Use calculator!).
a. p = π, p
∗ = 22/ 7
b. p = π, p
∗ = 3. 1416
(2) Find the largest interval in which p
∗ must lie to approximate
2 with
relative error at most 10
− 5 for each value for p.
(3) Use the 64-bit long real format to find the decimal equivalent of the follow-
ing floating-point machine numbers.
a. 0 10000001010 10010011000000 · · · 0
b. 1 10000001010 01010011000000 · · · 0
(4) Find the next largest and smallest machine numbers in decimal form for
the numbers given in the above problem.
(5) Use four-digit rounding arithmetic and the formulas to find the most ac-
curate approximations to the roots of the following quadratic equations.
Compute the relative error.
a.
x
2 −
x +
b. 1. 002 x
2
(6) Suppose that f l(y) is a k-digit rounding approximation to y. Show that
∣ ∣ ∣ ∣
y − f l(y)
y
−k+ .
(Hint : if dk+1 < 5, then f l(y) = 0.d 1 · · · dk × 10
n
. If dk+1 ≥ 5, then
f l(y) = 0.d 1 · · · dk × 10
n
n−k .)
1