February 2012
Intermediate to advanced
1184 pages
37h 17m
English
use bigrat;
This pragma bypasses the architecture-dependent treatment of numeric operations to work with rational numbers (that is, fractions) and keep them as rational numbers so you lose no precision (at least until you are ready for that):
use bigrat; say 1/2 + 1/3; # 5/6
This pragma works by overloading the numeric operators to use
Math::BigInt and Math::BigRat to compute values. See bigint.
Read now
Unlock full access