In mathematics and theoretical computer science, a real number a is said to be a computable number if it can be approximated by some algorithm, in the following sense: given any natural number n, the algorithm produces a number m such that:
Or, equivalently, there exists an algorithm which, given any rational error bound , produces an approximation m such that:
A complex number is called computable if its real and imaginary parts are computable.
The computable numbers form an algebraically closed field, and arguably this field contains all the numbers we ever need in practice. It contains all algebraic numbers as well as many known transcendental mathematical constants. There are however many real numbers which are not computable: the set of all computable numbers is countable (because the set of algorithms is) while the set of real numbers is not (see Cantor's diagonal argument).
While the set of computable numbers is countable, it cannot be enumerated by any algorithm, program or Turing machine. Formally: it is not possible to provide a complete list x1, x2, x3, ... of all computable real numbers and a Turing machine which on input (m, n) produces the n-th digit of xm. This is proved with a slight modification of Cantor's diagonal argument.