To keep track of position and time and quantities of different sorts, such as mass, volume, temperature, velocity,…, we use numbers:
- denotes the set of natural numbers
- denotes the set of integers ,
- denotes the set of rational numbers , where with .
A rational number has a decimal representation with a finite number of non-zero decimals or a neverending periodically repeating decimal representation. For example, , and
The basic arithmetical operations on rational numbers are
Rational numbers can in principle be represented exactly on a computer (because a finite number of digits suffices) and arithmetical operations can be performed by exact computer arithmetics.
In practice, arithmetical operations on rational numbers are usually performed by computer arithmetics with restricted precision (single, double or multiple precision). The same holds for irrational real numbers like and with infinite never-repeating decimal expansions, which are chopped to finite precision.