For use in a just-intonation sequencer; this calculates how far behind x to draw the numerator and denominator, according to how many digits each has.  Probably not much use to anyone for this purpose, but I thought I'd throw it out there.
 
-Chuckk