http://www.perlmonks.org?node_id=886513


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.

Replies are listed 'Best First'.
Re^2: Module for 128-bit integer math?
by BrowserUk (Patriarch) 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.
      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.
    A reply falls below the community's threshold of quality. You may see it by logging in.