Decimals are natively represented as rationals in Raku, so if the task does not need to handle repeating decimals, it is trivially handled by the .nude method, which returns the numerator and denominator:
say .nude.join('/') for 0.9054054, 0.518518, 0.75;
Output:
4527027/5000000
259259/500000
3/4
However, if we want to take repeating decimals into account, then we can get a bit fancier.