Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (14 sloc) 0.731 kb
=begin pod
=TITLE class FatRat
class FatRat is Cool does Rational[Int, Int]
A C<FatRat> is a rational number stored with arbitrary size numerator and
denominator. Arithmetic operations involving a C<FatRat> and optionally L<Int>
or L<Rat> objects return a C<FatRat>, avoiding loss of precision.
Since, unlike L<Rat>, FatRat arithmetics do not fall back L<Num> at some
point, there is a risk that repeated arithmetic operations generate
pathologically large numerators and denominators.
There are two common ways to generate C<FatRat> objects: through the
C<, Int)> constructor, which generates them from numerator and
denominator, or by calling the C<.FatRat> method on an L<Int> or L<Rat>
=end pod
Jump to Line
Something went wrong with that request. Please try again.