section_path: Decimal representation
section_name: Decimal representation
paragraph_text: Decimal representation
  
  The most common way of describing a real number is via its decimal representation, a sequence of decimal digits each representing the product of an integer between zero and nine times a power of ten, extending to finitely many positive powers of ten to the left and infinitely many negative powers of ten to the right. For a number x whose decimal representation extends k places to the left, the standard notation is the juxtaposition of the digits b k b k − 1 ⋯ b 0. a 1 a 2 ⋯, {\displaystyle b_{k}b_{k-1}\cdots b_{0}.a_{1}a_{2}\cdots,} in descending order by power of ten, with non-negative and negative powers of ten separated by a decimal point, representing the infinite series
  
  For example, for the circle constant π = 3.14159 ⋯, {\displaystyle \pi =3.14159\cdots,} k is zero and b 0 = 3, {\displaystyle b_{0}=3,} a 1 = 1, {\displaystyle a_{1}=1,} a 2 = 4, {\displaystyle a_{2}=4,} etc.
  
  More formally, a decimal representation for a nonnegative real number x consists of a nonnegative integer k and integers between zero and nine in the infinite sequence
  
  (If k > 0, {\displaystyle k>0,} then by convention b k ≠ 0. {\displaystyle b_{k}\neq 0.})
  
  Such a decimal representation specifies the real number as the least upper bound of the decimal fractions that are obtained by truncating the sequence: given a positive integer n, the truncation of the sequence at the place n is the finite partial sum
  
  The real number x defined by the sequence is the least upper bound of the D n, {\displaystyle D_{n},} which exists by Dedekind completeness.
  
  Conversely, given a nonnegative real number x, one can define a decimal representation of x by induction, as follows. Define b k ⋯ b 0 {\displaystyle b_{k}\cdots b_{0}} as decimal representation of the largest integer D 0 {\displaystyle D_{0}} such that D 0 ≤ x {\displaystyle D_{0}\leq x} (this integer exists because of the Archimedean property). Then, supposing by induction that the decimal fraction D i {\displaystyle D_{i}} has been defined for i < n, {\displaystyle i<n,} one defines a n {\displaystyle a_{n}} as the largest digit such that D n − 1 + a n / 10 n ≤ a, {\displaystyle D_{n-1}+a_{n}/10^{n}\leq a,} and one sets D n = D n − 1 + a n / 10 n. {\displaystyle D_{n}=D_{n-1}+a_{n}/10^{n}.}
  
  One can use the defining properties of the real numbers to show that x is the least upper bound of the D n. {\displaystyle D_{n}.} So, the resulting sequence of digits is called a decimal representation of x.
  
  Another decimal representation can be obtained by replacing ≤ x {\displaystyle \leq x} with < x {\displaystyle <x} in the preceding construction. These two representations are identical, unless x is a decimal fraction of the form m 10 h. {\textstyle {\frac {m}{10^{h}}}.} In this case, in the first decimal representation, all a n {\displaystyle a_{n}} are zero for n > h, {\displaystyle n>h,} and, in the second representation, all a n {\displaystyle a_{n}} 9. (see 0.999... for details).
  
  In summary, there is a bijection between the real numbers and the decimal representations that do not end with infinitely many trailing 9.
  
  The preceding considerations apply directly for every numeral base B ≥ 2, {\displaystyle B\geq 2,} simply by replacing 10 with B {\displaystyle B} and 9 with B − 1. {\displaystyle B-1.}