The rational number as the fraction

This online calculator writes the rational number as the fraction (the ratio of two integers), using the formula of infinite geometric sequence

When you start learning geometric sequences, you may come across a problem formulated like this:

Write the rational number 0.58333... as the ratio of two integers.

Of course, in this example problem we are actually asked to convert a repeating decimal to a fraction. Indeed, the solution to this problem requires the formula for the infinite geometric series. This calculator uses this formula to find out the numerator and the denominator for the given repeating decimal. The solution and the formulas are described below the calculator.

Note that in the problem above, repeating decimal is represented informally, by an ellipsis (three periods, ...). Actually, there are several notational conventions for representing repeating decimals, but none of them are accepted universally. For example, in the US, the notation is a horizontal line (a vinculum) above the repeating digits, and in some parts of Europe, the notation is to enclose the repeating digits in parentheses. The calculator supports the two ways to enter the repeating decimal: 0.58333... and 0.58(3)

PLANETCALC, The rational number as the ratio of two integers

The rational number as the ratio of two integers

The ratio of two integers

Repeating Decimal

To quote Wikipedia1, a repeating or recurring decimal is decimal representation of a number whose digits are periodic (repeating its values at regular intervals) and the infinitely repeated portion is not zero. 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. 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). And a rational number, by definition, is any number that can be expressed as the quotient or fraction p/q of two integers, a numerator p and a non-zero denominator q.

If we have terminating decimal, we can use Fraction to Decimal and Decimal to Fraction converter. In case of repeating decimal, the calculation becomes a bit trickier. And here we have geometric sequence to help. Let's use the example above and convert the rational number (we know it is rational because its decimal representation is repeating) 0.58333... to a fraction using our knowledge of geometric sequences.

Let's present our rational number like this:


The numbers 0.003, 0.0003, 0.00003, etc. can be thought of as the terms of the geometric sequence, where the first term is 0.003, and the common ratio is 0.1.

Indeed, accroding to the formula for n-th term of the geometric sequence: a_{n}=a\,r^{n-1}, we have

Note that these are terms of the infinite geometric series which converges, because the absolute value of a common ratio is less than one. The sum formula for the converging infinite series is


Thus, for our problem, we have

And finally,

We can add and then simplify, knowing that the lowest common multiple of 50 and 300 is 300, and the greatest common divisor of 175 and 300 is 25

URL copied to clipboard
Creative Commons Attribution/Share-Alike License 3.0 (Unported) PLANETCALC, The rational number as the fraction