Reduce a/b to the lowest form p/q such that p and q are co-primes.
Now q is of the form 2^m5^nc
We can convert power
of 2 and 5 to power of 10 by multiplying properly so the denominator can be
converted to 10^r c
If c is 1 then it
terminates.
If c is not 1 then c is coprime to 10 and the remainder and
hence the quotient repeats.
No comments:
Post a Comment