A decimal representation of a non-negative real number r is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator:
is the decimal separator, k is a nonnegative integer, and
are digits, which are symbols representing integers in the range 0, ..., 9.
If it is finite, the lacking digits are assumed to be 0.
are 0, the separator is also omitted, resulting in a finite sequence of digits, which represents a natural number.
The decimal representation represents the infinite sum:
For having a one-to-one correspondence between nonnegative real numbers and decimal representations, decimal representations with a trailing infinite sequence of 9 are sometimes excluded.
, is called the integer part of r, and is denoted by a0 in the remainder of this article.
Any real number can be approximated to any desired degree of accuracy by rational numbers with finite decimal representations.
has a finite decimal representation is easily established.)
For example, the number 1 may be equally represented by 1.000... as by 0.999... (where the infinite sequences of trailing 0's or 9's, respectively, are represented by "...").
Conventionally, the decimal representation without trailing 9's is preferred.
, an infinite sequence of trailing 0's appearing after the decimal point is omitted, along with the decimal point itself if
Certain procedures for constructing the decimal expansion of
For instance, the following algorithmic procedure will give the standard decimal representation: Given
inductively to be the largest integer such that: The procedure terminates whenever
is found such that equality holds in (*); otherwise, it continues indefinitely to give an infinite sequence of decimal digits.
and denoting the resultant decimal expansion by
The decimal expansion of non-negative real number x will end in zeros (or in nines) if, and only if, x is a rational number whose denominator is of the form 2n5m, where m and n are non-negative integers.
Proof: If the decimal expansion of x will end in zeros, or
Some real numbers have decimal expansions that eventually get into loops, endlessly repeating a sequence of one or more digits: Every time this happens the number is still a rational number (i.e. can alternatively be represented as a ratio of an integer and a positive integer).
Also the converse is true: The decimal expansion of a rational number is either finite, or endlessly repeating.
Finite decimal representations can also be seen as a special case of infinite repeating decimal representations.
Other real numbers have decimal expansions that never repeat.
Some well-known examples are: Every decimal representation of a rational number can be converted to a fraction by converting it into a sum of the integer, non-repeating, and repeating parts and then converting that sum to a single fraction with a common denominator.
The exponents are the number of non-repeating digits after the decimal point (3) and the number of repeating digits (4).
{\overline {0001}}\times {\frac {1}{10^{3}}}\\&=4567\times {\frac {1}{9999}}\times {\frac {1}{10^{3}}}\\&={\frac {4567}{9999}}\times {\frac {1}{10^{3}}}\\&={\frac {4567}{(10^{4}-1)\times 10^{3}}}&{\text{The exponents are the number of non-repeating digits after the decimal point (3) and the number of repeating digits (4).
{\displaystyle {\begin{aligned}\pm 8.123{\overline {4567}}&=\pm \left(8+{\frac {123}{10^{3}}}+{\frac {4567}{(10^{4}-1)\times 10^{3}}}\right)&{\text{from above}}\\&=\pm {\frac {8\times (10^{4}-1)\times 10^{3}+123\times (10^{4}-1)+4567}{(10^{4}-1)\times 10^{3}}}&{\text{common denominator}}\\&=\pm {\frac {81226444}{9999000}}&{\text{multiplying, and summing the numerator}}\\&=\pm {\frac {20306611}{2499750}}&{\text{reducing}}\\\end{aligned}}}
, although since that makes the repeating term zero the sum simplifies to two terms and a simpler conversion.
{\displaystyle {\begin{aligned}\pm 8.1234&=\pm \left(8+{\frac {1234}{10^{4}}}\right)&\\&=\pm {\frac {8\times 10^{4}+1234}{10^{4}}}&{\text{common denominator}}\\&=\pm {\frac {81234}{10000}}&{\text{multiplying, and summing the numerator}}\\&=\pm {\frac {40617}{5000}}&{\text{reducing}}\\\end{aligned}}}