[Gmp-commit] /var/hg/gmp: mpz/bin_uiui.c: Full normalization.

mercurial at gmplib.org mercurial at gmplib.org
Sun Apr 15 07:18:49 CEST 2012


details:   /var/hg/gmp/rev/f9a67d74a684
changeset: 14826:f9a67d74a684
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Apr 15 07:18:43 2012 +0200
description:
mpz/bin_uiui.c: Full normalization.

diffstat:

 mpz/bin_uiui.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r e5921f8355e8 -r f9a67d74a684 mpz/bin_uiui.c
--- a/mpz/bin_uiui.c	Sun Apr 15 06:27:53 2012 +0200
+++ b/mpz/bin_uiui.c	Sun Apr 15 07:18:43 2012 +0200
@@ -339,7 +339,7 @@
 
   mpn_pi1_bdiv_q_1 (rp, rp, rn, fac[k], facinv[k - 2],
 		    fac2cnt[k / 2 - 1] - i2cnt);
-  rn -= rp[rn - 1] == 0;		/* normalisation */
+  MPN_NORMALIZE_NOT_ZERO (rp, rn);
 
   SIZ(r) = rn;
 }
@@ -419,7 +419,7 @@
   mpn_pi1_bdiv_q_1 (rp, rp, rn, bin2kk[k - ODD_CENTRAL_BINOMIAL_OFFSET],
 		    bin2kkinv[k - ODD_CENTRAL_BINOMIAL_OFFSET],
 		    fac2bin[k - ODD_CENTRAL_BINOMIAL_OFFSET] - (k != hk));
-  rn -= rp[rn - 1] == 0;		/* normalisation */
+  MPN_NORMALIZE_NOT_ZERO (rp, rn);
 
   SIZ(r) = rn;
 }


More information about the gmp-commit mailing list