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 the decimal = 2 zero's, add a 1 and remove "." = 0.15 -> 15/100
1.5. 1 number after the decimal = 1 zero, add a 1 and remove "." = 1.5 -> 15/10
It is only non-decmals that are irrational, eg:
1/9 = 0.1111111 and that keeps going on forever
But the representation of 0.1111111 using the above logic, with 7 numbers after the decimal =
0.1111111 = 1111111/10000000