Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: bignum usage?

by ikegami (Patriarch)
on Oct 17, 2023 at 19:21 UTC ( [id://11155012] : note . print w/replies, xml ) Need Help??

in reply to bignum usage?


use Math::BigRat; # Useless use bignum; # Uses M::BigInt and M::BitFloat


use bignum upgrade => "Math::BigRat";
use bigrat;

I don't think they're equivalent -- the former initially creates M::BigInt objects and switches to M::BigRat when necessary, but I think the latter uses M::BitRat objects from the start -- but they have the same result here.