Hey kastamonu.

There is a way and its through logarithms.

The number of digits left over after dividing m into n digit will be ln(m/n) = ln(m) - ln(n) where ln(m) is the number of digits (in fractional form) and ln(n) is the number of digits for n (again in fractional form).

You can round the log results but that's the basic idea.