This is really a simple problem. It breaks down into two parts: 1) separate the integer and the decimal parts. 2) convert the decimal part to a fraction.
The first part has already been covered several times on the forum. Take the raw number as a float, subtract 0.5 and put the result in an integer. That's the integer part. Subtract the integer part from the float and put the result into a float, that's decimal part.
There are many ways to convert the decimal part into a fraction some easy some overly difficult. Either way you go, the first step is to convert the decimal into 64ths. Simply multiply the decimal part by 64 and put the result into an integer.
One easy way to get a fraction is to simply use this "64ths" integer as the index into an array of strings. Each element of the array holds the text for the fraction like this:
0 ""
1 "1/64"
2 "1/32"
3 "3/64"
4 "1/16"
etc.
The advantages are: it's simple, easy to follow, and executes very fast. The disadvantage is it consumes a lot of memory.
Another way is to recognize that the bit pattern of "64ths" contains everything you need to produce a reduced fraction. If bit 0 of "64ths" = 1, the denominator is 64 and the numerator = "64ths". If bit 0 of "64ths" = 0 and bit 1 = 1, the denominator is 32 and the numerator is "64ths" bit shifted right 1 place. If bit 0 and bit 1 of "64ths" = 0 and bit 2 =1, the denominator is 16 and the numerator is "64ths" bit shifted right 2 places. Continue this pattern for six rungs.
The advantages are: it's simple, fairly easy to follow, and executes pretty fast. The disadvantage is it's not as easy to follow as the lookup table. I would put a rung comment on each rung explaining what the intent is to offset that.
There is one boundary condition I didn't want to clutter the above description with. What if "64ths" = 64? You need to check for this first. If it happens, add 1 to the integer portion and set the fraction to a blank. The lookup table can handle this elegantly by having a blank string in the 0 position. For the second method, a 7th rung that concatenates the numerator + "/" + denominator would check for zero and make the string = " ". Since you don't want the "/" to show either on zero.