This is a language implementation problem. Some languages are lucky enough in their specifications to be able to handle infinitely long numbers and use ratios rather than floats.
To use ratios alternatively to floats is a good idea, but not every number is a rational number, and "handling infinitely long numbers" would imply infinite memory!
Shouldn't be too difficult to implement this behavior via overload in Perl just like BigInt, I'm even sure it has already been done on CPAN.