Math::Fraction is a Perl module to manipulate exact fractions.
SYNOPSIS
use Math::Fraction;
$a = frac(1,2); $b = frac(6,7);
print "$a + $b = ", $a + $b, "$a * $b = ", $a * $b;
print $a->num;
Product's homepage
Here are some key features of "Math::Fraction":
· Being able to add, subtract, multiply, and divide, among other things just like you would normal numbers that's to the overload module.
· Being able to convert a decimal, including repeating ones, into a fraction. For example, 1.142857142857 would become 8/7.
· Being able to control how the fraction is displayed. For example 8/7 verses 1 1/7
· Being able to use arbitrary size numbers in the numerator and the denominator.
· Being able to covert between SMALL (using normal floats/integers) and BIG (using arbitrary size floats/integers) as needed so you do not have to worry about it. (New as of ver .4a)
· Being able to have multiple default sets so that a function can modify the defaults with out effecting other functions (New as of ver .4a)
Requirements:
· Perl