Is there an algorithm that can calculate the digits of a repeating-decimal ratio without starting at the beginning?
I\'m looking for a solution that doesn\'t use ar
As a general technique, rational fractions have a non-repeating part followed by a repeating part, like this:
nnn.xxxxxxxxrrrrrr
xxxxxxxx
is the nonrepeating part and rrrrrr
is the repeating part.
The above is a rough outline and would need more precision to implement in an actual algorithm, but it should get you started.