This question is an exact duplicate of:

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.


marked as duplicate by José Carlos Santos, Chris Custer, max_zorn, Namaste, Parcly Taxel Jul 26 '18 at 1:14

This question was marked as an exact duplicate of an existing question.

  • $\begingroup$ Why "by calculator"? $\endgroup$ – fkraiem Oct 5 '14 at 3:16
  • 1
    $\begingroup$ You could do long division by hand until the pattern emerges. Since these are rational numbers, you know that they must either repeat or terminate. In the case where the denominator is prime, then it must repeat, so you can just get enough digits until you have the solution you seek. $\endgroup$ – Alfred Yerger Oct 5 '14 at 3:27
  • $\begingroup$ But it take a long time to do devision by hand. I want to know is there any way to do this by calculator ? $\endgroup$ – T.Nhan Oct 5 '14 at 3:33
  • $\begingroup$ Before calculators you could get the Fields medal for dividing 1 by 7. $\endgroup$ – user4894 Oct 5 '14 at 4:28
  • $\begingroup$ I think the duplicate is the other way around, this question was asked first and answered first. (You can hardly be duplicated more than these two questions: almost the exact same wording, from the same account.) $\endgroup$ – David K Jul 25 '18 at 12:42

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.


Not the answer you're looking for? Browse other questions tagged or ask your own question.