Theire is too much possibilities for your example...
3.75 = 3+3/4
but
3.5 = Normally 3+1/2 it could also be 3+2/4 or 3+4/8....
You have to develop a function to resolve this.
- Extract the integer.
- Search the Common divisor for the decimal part.
- How many times could this common divisor multiplied to reach the decimal value !
Remark... For the decimal par... work with integer.
For 0.1->0.9 work Base 10
For 0.01->0.99 work with 100
For 0.001->0.999 work with 1000
...