All decimals by default are rational
As P45cal pointed out, sinmply coun t the number of digits in a decimal and put a 1 in from of that many zero's as the denominator and remove the decimal
eg:
.5, 1 number after the decimal = 1 zero, add a 1 and remove "." = 0.5 -> 5/10
.15, 2 number after...