What is the largest floating point number a so that fl(100 + a) = 100?

202 Views Asked by At

What is the largest floating point number a so that fl(100 + a) = 100?

Here is how float number is computed.

$fl(a ⊙ b) = (a ⊙ b)(1 + δ)$. Where $|δ| ≤ ε$. Furthermore, $ε = 2^{-53}$.

My thought process:

$$fl(100 + a) = (100 + a) (1 + δ) = 100$$

So from here I just isolate for a?

1

There are 1 best solutions below

0
On

Your number $a$ has the value $a=2^{-47}:\;$ Since $100 = 2^6+2^5+2^2$ any IEEE double $x$ greater than $a= 2^6\times 2^{-53}=2^{-47}$ will have $fl(100+x)>100$. It remains to show that $fl(100+a)=100.\;$The hex representation of $a$ is a=3D00000000000000 and the next greater number $a_p = a(1+2^{-52})\;$ has the representation ap=3D00000000000001. You can verify that

100 + A  =   4059000000000000  +   3D00000000000000 = 4059000000000000 = 100
100 + AP =   4059000000000000  +   3D00000000000001 = 4059000000000001 > 100

Isolation of $a$ from your $fl()$ equation looks tricky with rounding to nearest IEEE double.