Decimal numbers, while arguably more useful to work with when performing calculations, lack the same kind of precision that regular fractions (as they are explained in this article) have. Sometimes an infinite number of decimals is required to convey the same kind of precision. Thus, it is often useful to convert repeating decimals into fractions.
For most repeating patterns, a simple division of the pattern by the same number of nines as numbers it has will suffice. For example (the pattern is highlighted in bold):
0.555… = 5/9
0.264264264… = 264/999
0.629162916291… = 6291/9999
In case zeros precede the pattern, the nines are suffixed by the same number of zeros:
0.0555… = 5/90
0.000392392392… = 392/999000
0.00121212… = 12/9900
In case a non-repeating set of decimals precede the pattern (such as 0.1523987987987…), we must equate it as the sum of the non-repeating and repeating parts:
0.1523 + 0.0000987987987…
Then, convert both of these to fractions. Since the first part is not repeating, it is not converted according to the pattern given above:
1523/10000 + 987/9990000
We add these fractions by expressing both with a common divisor...
1521477/9990000 + 987/9990000
And add them.
Finally, we simplify it: