Math::GMP and Pari Installed, But BigInt Can't Find Them

Discussion in 'Perl Misc' started by MaggotChild, Oct 27, 2009.

  1. MaggotChild

    MaggotChild Guest

    > perl -MMath::pari -e'$a=PARI 2;print $a**10000'
    #Big number...

    > perl -MMath::GMP -e'print Math::GMP->new(2) ** 1000'

    #Same Big Number...

    > perl -e'use Math::BigInt lib => "GMP,Pari";'

    Math::BigInt: couldn't load specified math lib(s), fallback to
    Math::BigInt::Calc at -e line 1

    What gives?

    As an aside, is it possible to import GMP or Pari from the command
    line? -M doesn't play nice with a string of import args:

    > perl -MMath::BigInt='lib,Pari' -e'1'

    #OK, can't load module error

    But:
    > perl -MMath::BigInt='lib,"GMP,Pari"' -e'1'

    "Pari"" is not exported by the Math::BigInt module
    Can't continue after import errors at -e line 0
    BEGIN failed--compilation aborted.
     
    MaggotChild, Oct 27, 2009
    #1
    1. Advertising

  2. MaggotChild

    MaggotChild Guest

    On Oct 27, 1:20 pm, Ben Morrow <> wrote:
    > Quoth MaggotChild <>:
    >
    > > > perl -MMath::pari -e'$a=PARI 2;print $a**10000'

    > > #Big number...

    >
    > > > perl -MMath::GMP -e'print Math::GMP->new(2) ** 1000'

    > > #Same Big Number...

    >
    > > > perl -e'use Math::BigInt lib => "GMP,Pari";'

    > > Math::BigInt: couldn't load specified math lib(s), fallback to
    > > Math::BigInt::Calc at -e line 1

    >
    > > What gives?

    >
    > You also need to install Math::BigInt::GMP and Math::BigInt::pari. (I
    > believe the former doesn't actually use the Math::GMP bindings at all,
    > and instead links with the C library directly.)


    Doh! OK, thanks.
     
    MaggotChild, Oct 28, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gnu valued customer

    Pari lib with Math-BigInt (win32)

    gnu valued customer, May 24, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    171
    Sisyphus
    May 26, 2004
  2. Replies:
    8
    Views:
    235
  3. Replies:
    9
    Views:
    580
    DJ Stunks
    Mar 6, 2007
  4. Sal
    Replies:
    2
    Views:
    256
  5. VK
    Replies:
    15
    Views:
    1,340
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page