Homework III: Approximations and Floating-Point Numbers, Assignments of Mathematics

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

Pre 2010

Uploaded on 08/31/2009

koofers-user-fta
koofers-user-fta 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
HOME WORK III
DUE : FEB/08/2006
The following homework are mostly from Chapter I, section 2 in your textbook.
(1) Compute the absolute error and relative error in approximations of pby p
(Use calculator!).
a. p=π, p= 22/7
b. p=π, p= 3.1416
(2) Find the largest interval in which pmust lie to approximate 2 with
relative error at most 105for 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. 1
3x2123
4x+1
6= 0
b. 1.002x2+ 11.01x+ 0.01265 = 0.
(6) Suppose that f l(y) is a k-digit rounding approximation to y. Show that
yfl(y)
y
0.5×10k+1.
(Hint : if dk+1 <5, then f l(y) = 0.d1···dk×10n. If dk+1 5, then
fl(y) = 0.d1···dk×10n+ 10nk.)
1

Partial preview of the text

Download Homework III: Approximations and Floating-Point Numbers and more Assignments Mathematics in PDF only on Docsity!

HOME WORK III

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

    1. 01 x + 0.01265 = 0.

(6) Suppose that f l(y) is a k-digit rounding approximation to y. Show that

∣ ∣ ∣ ∣

y − f l(y)

y

≤ 0. 5 × 10

−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

  • 10

n−k .)

1