[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Wed Nov 7 20:42:59 UTC 2018
details: /var/hg/gmp/rev/8431a9e26254
changeset: 17676:8431a9e26254
user: "Marco Bodrato <bodrato at mail.dm.unipi.it>"
date: Tue Oct 30 21:57:15 2018 +0100
description:
mpz/lucnum2_ui.c: Use mpn_rsblsh1_n if available
details: /var/hg/gmp/rev/dc02268aa47b
changeset: 17677:dc02268aa47b
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Wed Nov 07 21:40:45 2018 +0100
description:
ChangeLog
diffstat:
ChangeLog | 1 +
mpz/lucnum2_ui.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r 800e0c75fe00 -r dc02268aa47b ChangeLog
--- a/ChangeLog Wed Nov 07 21:24:41 2018 +0100
+++ b/ChangeLog Wed Nov 07 21:40:45 2018 +0100
@@ -4,6 +4,7 @@
* tests/mpz/t-nextprime.c: Add one more interval.
* tests/mpz/t-pprime_p.c (check_fermat_mersenne): New tests.
* mpn/generic/mod_1_3.c: typo in a comment.
+ * mpz/nextprime.c: Use tdiv instead of fdiv.
* mpn/generic/fib2m.c: New file, Fibonacci numbers modulo.
* configure.ac (gmp_mpn_functions): Add it.
diff -r 800e0c75fe00 -r dc02268aa47b mpz/lucnum2_ui.c
--- a/mpz/lucnum2_ui.c Wed Nov 07 21:24:41 2018 +0100
+++ b/mpz/lucnum2_ui.c Wed Nov 07 21:40:45 2018 +0100
@@ -79,8 +79,12 @@
SIZ(ln) = size + (c != 0);
/* L[n-1] = 2F[n] - F[n-1] */
+#if HAVE_NATIVE_mpn_rsblsh1_n
+ c = mpn_rsblsh1_n (l1p, f1p, l1p, size);
+#else
c = mpn_lshift (l1p, l1p, size, 1);
c -= mpn_sub_n (l1p, l1p, f1p, size);
+#endif
ASSERT ((mp_limb_signed_t) c >= 0);
l1p[size] = c;
SIZ(lnsub1) = size + (c != 0);
More information about the gmp-commit
mailing list