signed/unsigned comparison with nails in mpz/mul_i.h
marc.glisse at normalesup.org
Mon Nov 17 14:57:45 CET 2008
I noticed the following line of code in mpz/mul_i.h:
if (small_mult <= GMP_NUMB_MAX)
and I believe the intent was to write:
if (sml <= GMP_NUMB_MAX)
(sml is abs(small_mult)).
It is not a bug since it only makes small negative integers use the slow
code meant for large integers (I will never get used to the behaviour of
signed/unsigned comparisons). And anyway it seems like the nails support
has already changed a lot for 4.3 so this may have been modified already.
More information about the gmp-bugs