Skip to content

Range and Spacing of Floating-Point Numbers

Only a finite set of numbers can be represented in a floating-point system. This section answers three questions:

  1. How many numbers can be represented?
  2. What are the smallest and largest representable values?
  3. How are the numbers spaced on the number line?

Working Example Setup

We use Convention 1 (Standard Form) with:

β=2,m=3,emin⁡=−1,emax⁡=2\beta = 2,\quad m = 3,\quad e_{\min} = -1,\quad e_{\max} = 2

Step 1: List the Distinct Mantissas

In Convention 1, d1=1d_1 = 1 is fixed; d2d_2 and d3d_3 each range over {0,1}\{0, 1\}.
This gives 22=42^2 = \mathbf{4} distinct mantissas:

MantissaDecimal value
0.1000.10012=0.5\frac{1}{2} = 0.5
0.1010.10112+18=58=0.625\frac{1}{2} + \frac{1}{8} = \frac{5}{8} = 0.625
0.1100.11012+14=34=0.75\frac{1}{2} + \frac{1}{4} = \frac{3}{4} = 0.75
0.1110.11112+14+18=78=0.875\frac{1}{2} + \frac{1}{4} + \frac{1}{8} = \frac{7}{8} = 0.875

Step 2: List the Possible Exponents

e∈{−1,  0,  1,  2}e \in \{-1,\; 0,\; 1,\; 2\} → 4\mathbf{4} exponent values.


Counting Representable Numbers

Non-negative numbers=4 mantissas×4 exponents=16\text{Non-negative numbers} = 4 \text{ mantissas} \times 4 \text{ exponents} = \mathbf{16}

Including the sign bit: 16×2=3216 \times 2 = \mathbf{32} representable numbers (zero is a special case in Convention 1 — it cannot be stored exactly).


Smallest and Largest Values

Smallest positive number: smallest mantissa, smallest exponent:

Xmin⁡=(0.100)2×2−1=12×12=14X_{\min} = (0.100)_2 \times 2^{-1} = \frac{1}{2} \times \frac{1}{2} = \boxed{\frac{1}{4}}

Largest positive number: largest mantissa, largest exponent:

Xmax⁡=(0.111)2×22=(12+14+18)×4=78×4=72=3.5X_{\max} = (0.111)_2 \times 2^{2} = \left(\frac{1}{2}+\frac{1}{4}+\frac{1}{8}\right) \times 4 = \frac{7}{8} \times 4 = \boxed{\frac{7}{2} = 3.5}

Considering the sign, the full representable range is [−72,  72]\left[-\dfrac{7}{2},\; \dfrac{7}{2}\right].


Spacing Between Adjacent Numbers

For a fixed exponent ee, moving from one mantissa to the next changes only the last digit dmd_m, contributing β−m×βe=βe−m\beta^{-m} \times \beta^e = \beta^{e-m}.

For our example (m=3m = 3, β=2\beta = 2), the spacing at exponent ee is 2e−32^{e-3}:

Exponent eeNumbers (positive)Spacing =2e−3= 2^{e-3}
−1-114,  516,  38,  716\frac{1}{4},\; \frac{5}{16},\; \frac{3}{8},\; \frac{7}{16}116\frac{1}{16}
0012,  58,  34,  78\frac{1}{2},\; \frac{5}{8},\; \frac{3}{4},\; \frac{7}{8}18\frac{1}{8}
111,  54,  32,  741,\; \frac{5}{4},\; \frac{3}{2},\; \frac{7}{4}14\frac{1}{4}
222,  52,  3,  722,\; \frac{5}{2},\; 3,\; \frac{7}{2}12\frac{1}{2}

Verify for e=−1e = -1:

516−14=516−416=116✓\frac{5}{16} - \frac{1}{4} = \frac{5}{16} - \frac{4}{16} = \frac{1}{16} \checkmark

Visualising the Distribution

Number line showing the distribution of floating-point numbers across four exponent groups e=-1, e=0, e=1, e=2, demonstrating non-uniform spacing

Notice how the numbers become more spread out as the exponent grows. Near zero, numbers are densely packed; near the maximum, they are far apart.


The Key Insight: Non-Uniform Spacing