mpn_gcd documentation [Was: Replacing gcd_1 with gcd_11]

Marco Bodrato bodrato at
Fri Jan 3 11:11:42 UTC 2020


Il Dom, 18 Agosto 2019 2:04 pm, Niels Möller ha scritto:
> So we either have to update the docs to say that at least one of the
> inputs to mpn_gcd must be odd, or handle common factors of two before
> calling gcd_11 and gcd_22.

I suggest the following patch:

iff -r 5870bab2f759 doc/gmp.texi
--- a/doc/gmp.texi      Mon Dec 23 22:47:38 2019 +0100
+++ b/doc/gmp.texi      Fri Jan 03 12:07:43 2020 +0100
@@ -5493,8 +5493,9 @@
 the return value is the actual number produced.  Both source operands are

-It is required that @math{@var{xn} @ge @var{yn} > 0}, and the most
-limb of @{@var{yp}, @var{yn}@} must be non-zero.  No overlap is permitted
+It is required that @math{@var{xn} @ge @var{yn} > 0}, the most significant
+limb of @{@var{yp}, @var{yn}@} must be non-zero, and at least one of
+the two operands must be odd.  No overlap is permitted
 between @{@var{xp}, @var{xn}@} and @{@var{yp}, @var{yn}@}.
 @end deftypefun


More information about the gmp-devel mailing list