[karapas at gmail.com: Bug report for GMP-4.3.0]

Torbjorn Granlund tg at gmplib.org
Sat Apr 25 10:24:51 CEST 2009

Paul Zimmermann <Paul.Zimmermann at loria.fr> writes:

  > What sort of operations does NTL invoke in GMP for the failed operation?
  I have no idea.
  > At least one GMP operation has changed within its allowed return values,
  > and it is mpn_gcdext.
  it might be this one, since mpn_gcdext appears in the LLLTest binary.
  However I see no change in the documentation of mpn_gcdext between 4.2.4
  and 4.3.0.

No need for a change, since the new mpn_gcdext is within the
envelope allowed by the documentation.

The change is that the cofactor, r2 in the manual, might change but will
still satisfy r2*s1 + k*s2 = r1.

 The source file g_lip_impl.h of NTL also contains:
        _ntl_gsetlength(&d, sa+1); /* +1 because mpn_gcdext may need it...
                                      documentation is unclear, but this is
                                      what is done in mpz_gcdext */
        _ntl_gsetlength(&xa, sa+1); /* ditto */
        ddata = DATA(d);
        xadata = DATA(xa);
        sd = mpn_gcdext(ddata, xadata, &sxa, adata, sa, bdata, sb);
  Maybe you can comment on this?
It is not easy to say something educated about that code.


More information about the gmp-bugs mailing list