1.7 Representation of numbers: Floating point numbers

Consider a decimal number \(x\neq 0\). It can be written as follows:

 \begin{equation*} \begin{split} x &= S \times \bar{x} \times 10^E \quad \mbox{--- \ normalized form of $x$, with}\\ \rule{0mm}{0.9em} &\qquad S = \pm 1 \quad \mbox{--- \ sign,} \\ &\qquad \bar{x} \quad \mbox{--- \ mantissa (real number), } 1\leq \bar{x}\lt10, \\ &\qquad E \quad \mbox{--- \ exponent (signed integer number).} \end{split} \end{equation*}(1.7)
Examples:

 \begin{equation*} \begin{array}{lr} x&=-0.031_{10}=-3.1 \times 10^{-2} \ \rightarrow\ S=-1, \ \bar{x}=3.1, \ E=-2; \\ \rule{0mm}{0.7em} x&=185.79_{10}=1.8579 \times 10^2 \ \rightarrow\ S=1, \ \bar{x}=1.8579, \ E=2. \end{array} \end{equation*}(1.8)

Analogously, consider \(x\neq 0\) in the binary system (note the different range of \(\bar{x}\)):

 \begin{equation*} \begin{split} x &= S \times \bar{x} \times 2^E \quad \mbox{--- \ normalized form of $x$, with}\\ \rule{0mm}{0.9em} &\qquad S = \pm1 \quad \mbox{--- \ sign,} \\ &\qquad \bar{x} \quad \mbox{--- \ mantissa (real number), } 1\leq \bar{x}\lt2, \\ &\qquad E \quad \mbox{--- \ exponent (signed integer number).} \end{split} \end{equation*}(1.9)
Examples:

 \begin{equation*} \begin{array}{lr} x&=100.011_{2}=1.00011 \times 2^{2} \ \rightarrow\ S=1, \ \bar{x}=1.00011, \ E=2; \\ \rule{0mm}{0.7em} x&=-0.00101_{2}=-1.01 \times 2^{-3} \ \rightarrow\ S=-1, \ \bar{x}=1.01, \ E=-3. \end{array} \end{equation*}(1.10)


With frame Back Forward as PDF

© J. Carstensen (Comp. Math.)