Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Math::BigRat 0.26

    Download button

    No screenshots available
    Downloads: 388  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    7 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tels | More programs
    Perl Artistic License / FREE
    April 7th, 2008, 14:53 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Math::BigRat description

    A package arbitrary big rational numbers.

    Math::BigRat package arbitrary big rational numbers.

    SYNOPSIS

    use Math::BigRat;

    my $x = Math::BigRat->new('3/7'); $x += '5/9';

    print $x->bstr(),"n";
    print $x ** 2,"n";

    my $y = Math::BigRat->new('inf');
    print "$y ", ($y->is_inf ? 'is' : 'is not') , " infinityn";

    my $z = Math::BigRat->new(144); $z->bsqrt();


    Math::BigRat complements Math::BigInt and Math::BigFloat by providing support for arbitrary big rational numbers.

    MATH LIBRARY

    You can change the underlying module that does the low-level math operations by using:

    use Math::BigRat try => 'GMP';

    Note: This needs Math::BigInt::GMP installed.
    The following would first try to find Math::BigInt::Foo, then Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:

    use Math::BigRat try => 'Foo,Math::BigInt::Bar';

    If you want to get warned when the fallback occurs, replace "try" with "lib":

    use Math::BigRat lib => 'Foo,Math::BigInt::Bar';

    If you want the code to die instead, replace "try" with "only":

    use Math::BigRat only => 'Foo,Math::BigInt::Bar';


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    rational numbers | Perl module | mathematical library | mathematical | rational | numbers

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM