*** Welcome to piglix ***

Repeating decimal


A repeating or recurring decimal is decimal representation of a number whose decimal digits are periodic (repeating its values at regular intervals) and the infinitely-repeated portion is not zero. It can be shown that a number is rational if and only if its decimal representation is repeating or terminating (i.e. all except finitely many digits are zero). For example, the decimal representation of ⅓ becomes periodic just after the decimal point, repeating the single digit "3" forever, i.e. 0.333…. A more complicated example is 3227/555, whose decimal becomes periodic after the second digit following the decimal point and then repeats the sequence "144" forever, i.e. 5.8144144144…. At present, there is no single universally accepted notation or phrasing for repeating decimals.

The infinitely-repeated digit sequence is called the repetend or reptend. If the repetend is a zero, this decimal representation is called a terminating decimal rather than a repeating decimal, since the zeros can be omitted and the decimal terminates before these zeros. Every terminating decimal representation can be written as a decimal fraction, a fraction whose divisor is a power of 10 (e.g. 1.585 = 1585/1000); it may also be written as a ratio of the form k/2n5m (e.g. 1.585 = 317/2352). However, every number with a terminating decimal representation also trivially has a second, alternative representation as a repeating decimal whose repetend is the digit 9. This is obtained by decreasing the final non-zero digit by one and appending a repetend of 9. 1.000... = 0.999… and 1.585000... = 1.584999… are two examples of this. (This type of repeating decimal can be obtained by long division if one uses a modified form of the usual division algorithm.)


...
Wikipedia

...