# machine numbers in 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?

-

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

## 1 Answer

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 14, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9163996577262878, "perplexity_flag": "middle"}