Try the fastest way to create flashcards
Question

For which positive integers k can the number 5+2k5 + 2 ^ { - k } be represented exactly (with no rounding error) in double precision floating point arithmetic?

Solution

Verified
Answered 2 years ago
Answered 2 years ago
Step 1
1 of 2

We are looking for positive integers kk such that the number 5+2k5 + 2^{-k} can be represented exactly with no rounding error in double precision floating point arithmetic.

We have

(5)10=(101)2=(1.01×22)2.\begin{align*} \left( 5 \right)_{10} &= (101)_{2} \\ &= (1.01 \times 2^{2})_{2}. \end{align*}

Thus,

5+2k=1.01×22+1×2k=1.01×22+1×2k222=(1.01+1×2k2)×22.\begin{align*} 5 + 2^{-k} &= 1.01 \times 2^{2} + 1 \times 2^{-k} \\ &= 1.01 \times 2^{2} + 1 \times 2^{-k-2} 2^{2} \\ &= (1.01 + 1 \times 2^{-k-2} ) \times 2^{2} . \end{align*}

Then, as the number 5+2k5 + 2^{-k} can be represented exactly with no rounding error in double precision floating point arithmetic, we have

fl(5+2k)=5+2k.fl(5 + 2^{-k} ) = 5 + 2^{-k} .

So, we can Add 1 as bit 3,4,,523,4,\ldots,52 of the mantissa.

Hence,

2k2ϵmach2^{-k-2} \geq \epsilon_{mach}

2k22522^{-k-2} \geq 2^{-52}

Therefore,

k+252k+ 2 \leq 52

k50k \leq 50

As we are looking for positive integers, then

0k50.0 \leq k \leq 50 .

Create a free account to view solutions

Create a free account to view solutions

Recommended textbook solutions

Numerical Analysis 3rd Edition by Timothy Sauer

Numerical Analysis

3rd EditionISBN: 9780134696454 (2 more)Timothy Sauer
383 solutions
Numerical Analysis 2nd Edition by Timothy Sauer

Numerical Analysis

2nd EditionISBN: 9780321783929Timothy Sauer
385 solutions
Numerical Analysis 9th Edition by J. Douglas Faires, Richard L. Burden

Numerical Analysis

9th EditionISBN: 9780538733519J. Douglas Faires, Richard L. Burden
2,677 solutions
Numerical Analysis 9th Edition by J. Douglas Faires, Richard L. Burden

Numerical Analysis

9th EditionISBN: 9780538735636J. Douglas Faires, Richard L. Burden
2,677 solutions

More related questions

1/4

1/7