Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Module for 128-bit integer math?

by ambrus (Abbot)
on Feb 06, 2011 at 13:08 UTC ( #886513=note: print w/ replies, xml ) Need Help??


in reply to Module for 128-bit integer math?

May I ask out of curiosity what you would like to use those integers for? Eg. block cyphers, message digests, graphics, physical modeling, amounts of money?

What seems strange to me is that you want more performance than you can get using any of the generic big integer modules, yet you still want to do individual integer operations in perl, as opposed to using higher level functions written in C, such as a cryptographic library or a library for numerical vectors.

For reference to visitors, some (but not all) arbitrary precision integer libraries on CPAN are the two fast backends of Math::BigInt (Math::BigInt::GMP and Math::BigInt::Pari), Math::GMP, Math::GMPz, Math::Pari. I believe that none of the integer vector modules support 128 bit integers: PDL just doesn't, whereas Math::GSL wraps C libraries (GSL and indirectly BLAS) which only support real and complex floating point vectors.

Update 2011-03-18: continuing the list of arbitrary precision arithmetic solutions, see also Convert big number from decimal to hexadecimal.


Comment on Re: Module for 128-bit integer math?
Re^2: Module for 128-bit integer math?
by BrowserUk (Pope) on Feb 06, 2011 at 14:23 UTC

    You have a problem with me asking if such a module is available?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Don't you know? There's a specific Perlmonks trait: if you don't know the answer, but still want to rank in some XP points, question the sanity of the request.
      Some of us do suffer from curiosity. Show us only the tusk, and our minds become restless trying to fathom the nature and purpose of the beast.
        Some of us do suffer from curiosity.

        I would like a 128-bit integer math library so that I can do 128-bit integer math.

        I asked "Is there a module available for doing this?". Answers include: 'yes' or 'no'

        That is the beast.

        "I don't know why anyone would want 128-bit integer math!" commentaries were not sought nor are they helpful.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://886513]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-04-20 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls