mpn_gcd[ext] interface details

Niels Möller nisse at
Tue May 10 20:58:25 CEST 2011

Torbjorn Granlund <tg at> writes:

> I have not had time to check the implementation, but if it too did not
> require any normalisation, then it seems we broke backwards
> compatibility, furthermore without flagging properly about it...

I'm looking at gmp-4.2.4 now.

According to the ASSERTs, mpn_gcd required
both inputs U and V normalized, usize >= vsize >= 1, and V odd. And in
addition, that bitsize(U) >= bitsize(V).

And mpn_gcdext required both inputs normalized, and usize >= vsize >= 1.

So I think normalization has been required for a long time.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list