Is the following numbers machines numbers on the IEEE single precision system?
$10^{304}$
$2^4+2^{27}.$
What do I have to do to know whether they are machine numbers on IEEE single precision?
|
Is the following numbers machines numbers on the IEEE single precision system? $10^{304}$ $2^4+2^{27}.$ What do I have to do to know whether they are machine numbers on IEEE single precision? |
||||
|
|
A number $x$ is representable in IEEE single-precision format if it can be written in the form $$x = S\cdot 2^{e}$$ for an integer $S$ between $-(2^{24}-1)$ and $+(2^{24}-1)$ and an integer $e$ between -126 and +127. In particular, $10^{304}$ can't, because it is much too big, but $2^4+2^{27}$ can: we can factor out $2^4$ from both terms to get: $$2^4+2^{27} = (2^{23}+1)\cdot2^4$$ Where here $S = 2^{23}+1$ and $e=+4$. The tricky thing about the second number is that the significand ($S$ value) of an IEEE single-precision number must fit into 23 bits, and here $S = 2^{23}+1$ = |
||||
|
|