/* If we were to write out log (p/q) in base 2, then the position of the
first non-zero bit (ie. k in our notation) would be the durlog
and the number of consecutive 1s after that bit would be the number of
dots */
/* If we were to write out log (p/q) in base 2, then the position of the
first non-zero bit (ie. k in our notation) would be the durlog
and the number of consecutive 1s after that bit would be the number of
dots */