Converting between fractional and repeating decimal notation for rational numbers.
Converting from a fraction to a repeating decimal.
Simply divide the denominator of the fraction into the numerator. After the point where you are bringing down all zeros watch for a remainder that matches a previous one. This will then define a cycle since the remainders will all repeat.
To convert from a repeating decimal x to a fraction simply identify A as the number of decimal places to just before the repetition and B the number of placed to the end of the repetition.
Now take 10Bx and subtract 10Ax. The values beyond the decimal place should line up so that the difference is a Natural number C.
x is C / ( 10B - 10A )