bigrat

Implements big rational support for Perl. For example, if you want to add the fractions 1/2 + 3/8, you can use bigrat to calculate the result and display it in fractional form: 7/8. Or in Perl terms:

#!/usr/local/bin/perl -w
use bigrat;
 
my $frac1 = 1/2;
my $frac2 = 3/8;
print $frac1 + $frac2, "
"; # Prints 7/8

As of Perl 5.8, bigrat is shipped with the Perl source kit.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.22.77