Is there an algorithm for figuring out the following things?
You can do a long division, noting the remainders. The structure of the remainders will give you the structure of any rational decimal:
In general the distances will give you the amount of digits for each part.
You can see this algorithm coded in C++ in the method decompose()
here.
Try 228142/62265
, it has a period of 1776 digits!