Try the fastest way to create flashcards
Question

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

Solution

Verified
Step 1
1 of 2

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

We have

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

Thus,

\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 + 2^{-k}$ can be represented exactly with no rounding error in double precision floating point arithmetic, we have

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

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

Hence,

$2^{-k-2} \geq \epsilon_{mach}$

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

Therefore,

$k+ 2 \leq 52$

$k \leq 50$

As we are looking for positive integers, then

$0 \leq k \leq 50 .$

## Recommended textbook solutions #### Numerical Analysis

3rd EditionISBN: 9780134696454 (2 more)Timothy Sauer
383 solutions #### Numerical Analysis

2nd EditionISBN: 9780321783929Timothy Sauer
385 solutions #### Numerical Analysis

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

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