mpz_invert (x, 1, 0)

Torbjorn Granlund tg at
Mon Mar 5 18:58:02 CET 2012

bodrato at writes:

  I'd like to backport the test and the documentation changes to 5.0, now.
Be my guest...  (We should perhaps do this sort of things, even without
expecting more 5.0 releases.)

  >   What should we do with mpz_powm, and mpz_powm_ui? The code for both
  >   functions starts with:
  >     n = ABSIZ(m);
  >     if (n == 0)
  >       DIVIDE_BY_ZERO;
  > Would you want to change that?
  It's not necessary. But this is a branch in modular code for a case nobody
  uses... You may want to change that :-)
I plain predictable jump does not worry me.  A complex test with many
conjunctions, is a completely different animal.

(We should wrap an UNLIKELY around that test, though.)


More information about the gmp-devel mailing list