Cofactor canonicalisation of mpn_gcdext

Torbjorn Granlund tg at gmplib.org
Wed Dec 2 16:40:58 CET 2009


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

  nisse at lysator.liu.se (Niels Möller) writes:
  
  > To get the old behaviour back, there are a couple of not too difficult
  > things that have to be done:
  >
  > 1. Change interface and implementation of gcdext_1, currently defined
  > [...]
  > 2. There's one call to gcdext_1, in mpn/gcdext_lehmer.c. [...]
  >    Change this code adapt to the new gcdext_1 interface with signed
  >    cofactors. 
  
  I'm attaching a patch addressing these first two points. For those with
  access to shell, it's also in the repository at ~nisse/hack/gmp-gcdext.
  
It is nice that you found time to work on this!

I think you forgot to put the code in your shell repo.

  Passes make check, but I haven't investigated what effect it really has
  on the cofactors. Next step would be to change the gcdext test code to
  require more strict canonicalization.
  
I have a hacked test program, but I am not sure it enforces the
agreed-upon results for border cases (u,0), (0,u), (u,u), (0,0).

-- 
Torbjörn


More information about the gmp-devel mailing list