Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is the following numbers machines numbers on the IEEE single precision system?



What do I have to do to know whether they are machine numbers on IEEE single precision?

share|cite|improve this question
I'd say that the correct statement of the question is rather: Are the following numbers representable in the IEEE single-precision format? – leonbloy Dec 9 '12 at 0:38
up vote 1 down vote accepted

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$ = 1000,00000,00000,00000,00001, which would seem to require 24 bits. But in IEEE format, the initial 1 is not stored, and is always implicit. So we can squeeze in that extra bit.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.