3 ms·
FWIW, Perl 6 has rational numbers with limited precision built in: https://docs.perl6.org/type/Rat https://docs.perl6.org/type/Rat . As soon as the denominator
by lizmat 7y ago
FWIW, Perl 6 has rational numbers with limited precision built in: https://docs.perl6.org/type/Rat https://docs.perl6.org/type/Rat . As soon as the denominator exceeds 64bit, then the Rat will be changed to a Num (aka float). If that's not desirable, one can also use FatRat: https://docs.perl6.org/type/FatRat https://docs.perl6.org/type/FatRat . In that case, both the numerator as well as the denominator are BigInts.