[Gmp-commit] /var/hg/gmp: Amend last change: Call mpn_pi1_bdiv_q_1 with oddif...

mercurial at gmplib.org mercurial at gmplib.org
Tue Feb 7 15:50:18 UTC 2017


details:   /var/hg/gmp/rev/69c512606e05
changeset: 17230:69c512606e05
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue Feb 07 16:50:14 2017 +0100
description:
Amend last change: Call mpn_pi1_bdiv_q_1 with oddified divisor.

diffstat:

 mpn/generic/compute_powtab.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r ff64a5705a4c -r 69c512606e05 mpn/generic/compute_powtab.c
--- a/mpn/generic/compute_powtab.c	Tue Feb 07 15:28:35 2017 +0100
+++ b/mpn/generic/compute_powtab.c	Tue Feb 07 16:50:14 2017 +0100
@@ -237,14 +237,14 @@
       if (digits_in_base != exptab[pi])	/* if ((((un - 1) >> pi) & 2) == 0) */
 	{
 	  if (__GMP_LIKELY (base == 10))
-	    mpn_pi1_bdiv_q_1 (t, t, n, big_base,
+	    mpn_pi1_bdiv_q_1 (t, t, n, big_base >> MP_BASES_BIG_BASE_CTZ_10,
 			      MP_BASES_BIG_BASE_BINVERTED_10,
 			      MP_BASES_BIG_BASE_CTZ_10);
 	  else
 	    /* FIXME: We could use _pi1 here if we add big_base_binverted and
 	       big_base_ctz fields to struct bases.  That would add about 2 KiB
 	       to mp_bases.c.  */
-	    mpn_bdiv_q_1 (t, t, n, big_base);
+	    mpn_divexact_1 (t, t, n, big_base);
 
 	  n -= t[n - 1] == 0;
 	  digits_in_base -= chars_per_limb;


More information about the gmp-commit mailing list