To keep track of position and time and quantities of different sorts, such as mass, volume, temperature, velocity,…, we use numbers:
- N denotes the set of natural numbers 0, 1, 2, 3,…defined by repetition of the basic operation +1.
- Z denotes the set of integers consisting the natural numbers 0, 1, 2, 3,… with 1, 2, 3,…as positive natural numbers complemented by the negative natural numbers -1, -2, -3,…with -n defined as solution x to the equation x + n = 0 with n a natural number.
- Q denotes the set of rational numbers or fractions p/q defined as solutions x to the equation q*x = p with p and q integers with q not 0.
- We see that Q includes Z as p/q with q = 1, and that Z includes N.
A rational number in fractional form has a decimal representation with a finite number of non-zero decimals or a neverending periodically repeating decimal representation. For example, 3/2 = 1.5, 1/3 = 0.3333…, and 11/13=0.84615384615384…
In binary representation we have 1/2 = 0.1, 1/3 = 0.010101….
Inspect Construction of Rational Numbers showing computation in decimal form of fractions p/q as solutions x of q*x=p.
Notice that there is between a fraction like 2/3 as the solution x to the equation 3*x = 2 and the (never-ending periodic) decimal expansion 2/3 = 0.66666…, in the sense that the decimal expansion gives exact information about the size of the number as the essential information, while 2/3 is rather a sign or token of a solution to an equation left unsolved. It is like √2 denoting the solution x to the equation x*x = 2 without revealing its decimal expansion. A decimal expansion is explicit showing its true face , while a 2/3 and √2 are implicit as faces behind a mask.
The basic arithmetical operations on rational numbers are
with rules of computation which follow from the above definitions. For example, we have that 2 + 3 = 3 + 2 since both expressions are shorthand for +1+1+1+1+1. Further, we have that 1/2 + 1/3 = 5/6, since if 2*x=1 and 3*y=1, then 3*2*x + 2*3*y = 5 and so 3*2*(x+y) = 5 or 6*(x+y)=5.
More generally, the following rules for computing with fractions result can be derived (do that) from the definitions o x=p/q as solution to q*x=p and y=r/s as solution to s*y=r) that
- p/q * r/s = p*r/q*s, (1)
- p/q + r/s = (p*s+r*q)/(q*s). (2)
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 in binary/decimal representation with restricted precision/number of digits (single, double or multiple precision). The same holds for irrational real numbers like square-root of 2 (as solution x to the equation x*x = 2) and PI with infinite never-repeating decimal expansions, which are chopped to finite precision.
There are also complex numbers as pairs (x,y) of rational numbers x and y with specific rules of computation allowing in particular the equation z*z + 1 =0 in the complex unknown z to have a solution as z = +i or -i with i = (0,1) the imaginary unit.
In traditional school mathematics computation with fractions p/q using the rules (1) and (2) has a central role as a showcase for algebra. Computation with fractions is feared by many students because it is tricky and and therefore used as selection mechanism. The same computations in decimal/binary are not tricky and thus accessible to everyone.
In the digital form of mathematics in DigiMat algebraic computation with fractions serves little role which opens time to more fruitful mathematics.
Example of continued fraction representation of PI which hides the value of PI.To do: Compute the value of PI from the representation.