Binomial improvements

Torbjorn Granlund tg at
Fri Dec 9 14:39:40 CET 2011

I rewrote the new code using the same basic algorithm.  This is now
probably close to correct.  It passes lots of tests.

The code is about 2.5 times faster than the old code, at least for
arguments of the type 2n over n.  (This code as well as the old code is
still slow for large operands; we need a factorisation based algorithm
over a threshold.  I think Marco is working on that.)

Trimming intermediate results to never be (much) greater than the
anticipated end result has not been done.  I believe that to be a very
important optimisation.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin_uiui4.c
Type: application/octet-stream
Size: 7398 bytes
Desc: not available
URL: <>
-------------- next part --------------


More information about the gmp-devel mailing list