mpz_jacobi

Torbjorn Granlund tg at gmplib.org
Tue Apr 27 18:31:20 CEST 2010


nisse at lysator.liu.se (Niels Möller) writes:

  nisse at lysator.liu.se (Niels Möller) writes:
  
  > * mpn_jacobi_subdiv_step almost identical to mpn_gcd_subdiv_step and
  >   mpn_gcdext_subdiv_step. Since these are not performance critical, they
  >   should most likely be unified. There's also code in hgcd.c:hgcd_step
  >   which does something very similar.
  
  I've now written a more general variant, taking two hook functions as
  argument. Tested with gcd and gcdext, and should work with jacobi as
  well. I'd like to have some feedback before I commit this.

I can give very feeble feedback, since I am sadly uninformed about this.
Of course, I like the cmbination of these functions, since they are
non-critical.

Have you checked that all hook call sites are actually triggered by
current tests?  An ASSERT_ALWAYS(0) might be god to make sure the new
code is actually tested.

  (Ah, and on posting this, I notice that the initial coomment is
  incorrect. The function doesn't copy anything to gp; it calls the done
  function which may or may not store the gcd for later use).

Incoorrect cooments are noot good.  :-)

-- 
Torbjörn


More information about the gmp-devel mailing list