mini-gmp.c mpz_import still has a bug

bodrato at bodrato at
Mon Jan 21 06:30:43 CET 2013


A previous message of mine to this list got lost in the net...

Il Sab, 5 Gennaio 2013 4:02 pm, shuax ha scritto:
>     and in the full version calculate woffset by this way:
>         numb = size * 8 - nail;

But the mini version does not allow a non-zero nail parameter.
mini-gmp/README warns about this difference.

>     Here are some different.In short, in the double loop the p pointer
>     position is not calculated correctly.
>     In addition, the effect of mpz_export compared to the full version is
>     also inconsistent.

You are right. Some functions of mini-gmp was not tested by the testsuite,
in particular there were some bugs in mpz_{import,export}. The code in the
development branch should be much cleaner now. It is not released yet, but
if you want you can test the last snapshot from

Thanks for your report,

More information about the gmp-bugs mailing list