Convert a fraction to infinite repeating decimal?

1.3k Views Asked by At

We all know how to convert an infinite repeating decimal to fraction. It is simple. But now I have these fractions 10/23, 3/29, etc. I know these fractions can be written in infinite repeating decimal, but the repeating digits are too long ( over 10 digits), so it cannot show fully on the calculator screen. So is there any algorithm to find the repeating decimal digits by calculator ? thanks very much.

1

There are 1 best solutions below

0
On BEST ANSWER

An important fact, coming from Euler's theorem, is that the repeat period of $a/b$ divides into $\phi(b)$. You can use a calculator similarly to doing it by hand, but getting more digits at once. If I type $10/23$ into my calculator, it gives $0.434782609$ in the display. There may be some guard digits held inside the calculator and not displayed. Clear it, type in $0.43478260 \times 23$ (note I deleted the last digit to avoid rounding problems) and get $9.9999998$, which is exact. The remainder is $2E-7$, so divide that by $23$, getting $0.086956522$, so now you have $0.4347826086956522$ As it hasn't repeated yet, the repeat is $22$ digits. Delete the last digit, find the remainder, divide again, and you are there.