GMP library (factorial, binomial, perfect power)

bodrato at bodrato at
Mon Apr 23 19:13:26 CEST 2012

Dear Lhoussain,

Il Lun, 23 Aprile 2012 10:36 am, Lhoussain Aitassou ha scritto:
> I would be interested to participate to the development of GMP library.
> These points would interest me :
>> Factorial

I rewrote the code for factorial (mpz_fac_ui) a couple of months ago

Of course there can be even better implementations. Which algorithm would
you suggest?

Now, we also have the code for the 2-multi-factorial n!!= n(n-2) in the
library, we should probably add also a general multi-factorial function (I
have some C-code and a small LaTeX-note, if you are interested).

>> Binomial coefficients

Also the code for binomial (mpz_bin_uiui) is changing these days.

It can be the right time to experiment and/or to suggest!

Moreover the code for binomial(N,K) with very big N (mpz_bin_ui) needs a
complete rewrite, in my opinion. This has not started, yet.

>> Perfect power

The code for perfect power is a few years old.

Do you have some ideas to rewrite it with some more efficient algorithm?

Best regards,


More information about the gmp-devel mailing list