Due to the representation in a specifically specified storage format, a finite number of numbers is created. Signed integers with a length of n bits in two's complement can map the numbers from to , unsigned from 0 to . With a length of 8 bits (one byte ), the numbers from −128 to +127 can be stored with a sign, and from 0 to 255 without a sign.
Real numbers are stored as a combination of mantissa * exponent . Because of this, rounding errors occur if the result does not accidentally hit exactly one machine number again. How these numbers can be saved is partially standardized - e.g. B. IEEE 754 .
The reduction mapping maps an (exact) real number onto the computer representation .
In principle, every real number can be represented uniquely in a power series representation for the base :
,
whereby the following restrictions (for uniqueness) should apply:
In a computer display, mantissas of unlimited length cannot be stored, but only a finite mantissa with the mantissa length . There is also a restricted interval for the exponent : with .
The reduction map is defined as follows:
Remarks
The number can also be accurately represented by: .
For with an exponent that is not in the interval , the reduction map is defined as follows:
It is important to note here that is neither injective nor surjective . Namely, many numbers are represented with the same machine number (therefore not injective) or the picture of the function is only a finite set (therefore not surjective).
Another frequently used name for the reduction figure is: .
They can be used to determine the absolute rounding error when coding a number .
See also
the accuracy of the representation using machine numbers describes the machine accuracy