[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Dec 18 08:20:05 UTC 2016
details: /var/hg/gmp/rev/376b5009ba9a
changeset: 17164:376b5009ba9a
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 18 09:01:56 2016 +0100
description:
mpz/gcdext.c: ASSERT (s != NULL)
details: /var/hg/gmp/rev/c808252cfe04
changeset: 17165:c808252cfe04
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 18 09:17:25 2016 +0100
description:
tests/mpz/t-invert.c: Do not accept non invertible elements in the zero ring.
details: /var/hg/gmp/rev/1cdb2f2d864b
changeset: 17166:1cdb2f2d864b
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 18 09:19:44 2016 +0100
description:
ChangeLog
diffstat:
ChangeLog | 6 ++++++
mpz/gcdext.c | 6 ++++--
tests/mpz/t-invert.c | 3 ---
3 files changed, 10 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r 84ce52f0d360 -r 1cdb2f2d864b ChangeLog
--- a/ChangeLog Sat Dec 17 21:26:50 2016 +0100
+++ b/ChangeLog Sun Dec 18 09:19:44 2016 +0100
@@ -1,3 +1,9 @@
+2016-12-17 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * mpz/gcdext.c: Save an allocation if both cofactors are needed.
+ * mpz/oddfac_1.c: Revision of all ASSERTs.
+ * tests/mpz/t-invert.c: All elements are invertible in the zero ring.
+
2016-12-07 Torbjörn Granlund <tg at gmplib.org>
* gmp-h.in: Check yet another symbol for FILE.
diff -r 84ce52f0d360 -r 1cdb2f2d864b mpz/gcdext.c
--- a/mpz/gcdext.c Sat Dec 17 21:26:50 2016 +0100
+++ b/mpz/gcdext.c Sun Dec 18 09:19:44 2016 +0100
@@ -50,6 +50,8 @@
asize = ABSIZ (a);
bsize = ABSIZ (b);
+ ASSERT (s != NULL);
+
if (asize < bsize)
{
MPZ_SRCPTR_SWAP (a, b);
@@ -81,8 +83,8 @@
TMP_MARK;
TMP_ALLOC_LIMBS_2 (tmp_gp, bsize, tmp_sp, asize + bsize + bsize + 1);
- tmp_ap = tmp_sp + bsize + 1;
- tmp_bp = tmp_ap + asize;
+ tmp_bp = tmp_sp + bsize + 1;
+ tmp_ap = tmp_bp + bsize;
MPN_COPY (tmp_ap, PTR (a), asize);
MPN_COPY (tmp_bp, PTR (b), bsize);
diff -r 84ce52f0d360 -r 1cdb2f2d864b tests/mpz/t-invert.c
--- a/tests/mpz/t-invert.c Sat Dec 17 21:26:50 2016 +0100
+++ b/tests/mpz/t-invert.c Sun Dec 18 09:19:44 2016 +0100
@@ -94,9 +94,6 @@
}
else /* Inverse deos not exist */
{
- if (mpz_cmpabs_ui (m, 1) <= 0)
- continue; /* OK */
-
mpz_gcd (t, a, m);
if (mpz_cmp_ui (t, 1) == 0)
{
More information about the gmp-commit
mailing list