Howdy,

To my extreme enjoyment, I found out that someone has already taken
the burden of creating a full interface to the GMP integer functions
in the form of Math::GMPz [1]. There is also Math::GMPf and
Math::GMPq, in case you were wondering.

Cheers,


[1] http://search.cpan.org/dist/Math-GMPz/


On Fri, May 1, 2009 at 12:31 PM, Jonathan Leto <[email protected]> wrote:
> Howdy,
>
> I want to give Perl full access to the GMP library [1] and I am making
> that happen so that these routines can be used by Crypto::* and
> Math::* modules. The ultimate goal of this is so that the Crypt::*
> namespace will not depend on Math::Pari. The first step on this path
> is Math::Primality [2], which is involved in Google Summer of Code
> 2009 [3] and which will provide is_prime() and next_prime() functions
> for BigInts. These functions seem to be the main reason why so many
> crypto modules have no choice but to use Math::Pari. After is_prime()
> and next_prime() are implemented, many modules could in theory be
> ported over to Math::BigInt, but there are many routines which are
> currently not available from Perl in GMP that will speed up things
> considerably. I cannot quantify this right now, but I am willing to
> bet roughly an order of magnitude or two.
>
> Currently there is:
>
> Math::GMP - only a small subset of the GMP library to emulate Math::BigInt API
> Math::BigInt::GMP - A faster implementation of the small subset for
> the Math::BigInt API
> Math::GMP::SWIG [4] (unreleased) - A full interface to GMP via SWIG,
> which I was actively working on but then ran into odd memory
> corruption errors and has been on hold lately.
>
> My main questions to this list are:
>
> 1) Does anybody have suggestions for a name for the CPAN module which
> will provide the full interface to GMP?
> 2) What do people hate/love/want to see in the Math::BigInt API ?
>
> Currently I have been hacking in the functions that I needed into my
> fork of Math::BigInt::GMP on github [5], but some stuff has nothing to
> do with the BigInt API and just doesn't belong there. I talked to Tels
> (who maintains Math::BigInt and Math::BigInt::GMP) and he gave me
> co-maintainer status, as he said that he does not have time to
> maintain these modules.
>
> If any one has any other comments regarding what they would like to
> see in regard to scientific computing with Perl, I would love to hear
> it.
>
> Cheers,
>
>
> NOTE: Crypto modules only require BigInts, not BigFloats, so the first
> iteration of all this will most probably only implement the integer
> algorithms of GMP.
>
> [1] http://gmplib.org/
> [2] http://github.com/leto/math--primality/tree/master
> [3] 
> http://leto.net/dukeleto.pl/2009/04/google-announces-nine-students-in-gsoc2009-with-the-perl-fou.html
> [4] http://leto.net/gitweb/?p=Math-GMP-SWIG.git;a=summary
> [5] http://github.com/leto/math--bigint--gmp/tree/master
>
>
>
> --
>
> Jonathan Leto
> [email protected]
> http://leto.net
>



-- 

Jonathan Leto
[email protected]
http://leto.net

Reply via email to