[Gmp-commit] /var/hg/gmp-5.0: Remove ambiguity spotted by Torbjorn.

mercurial at gmplib.org mercurial at gmplib.org
Tue Mar 15 17:16:06 CET 2011


details:   /var/hg/gmp-5.0/rev/0649343c44f0
changeset: 13443:0649343c44f0
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Mar 15 17:16:02 2011 +0100
description:
Remove ambiguity spotted by Torbjorn.

diffstat:

 ChangeLog                            |  4 ++++
 mpn/generic/toom_interpolate_16pts.c |  4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 1ebe39104437 -r 0649343c44f0 ChangeLog
--- a/ChangeLog	Thu Feb 10 11:32:39 2011 +0100
+++ b/ChangeLog	Tue Mar 15 17:16:02 2011 +0100
@@ -1,3 +1,7 @@
+2011-03-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/toom_interpolate_16pts.c: Remove ambiguity.
+
 2011-01-25 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpz/mul.c: Remove redundant size computation.
diff -r 1ebe39104437 -r 0649343c44f0 mpn/generic/toom_interpolate_16pts.c
--- a/mpn/generic/toom_interpolate_16pts.c	Thu Feb 10 11:32:39 2011 +0100
+++ b/mpn/generic/toom_interpolate_16pts.c	Tue Mar 15 17:16:02 2011 +0100
@@ -335,14 +335,14 @@
   MP_PTR_SWAP(r3, wsi);
 #endif
 
-  r7[n3] -= DO_mpn_sublsh_n (r7 + n + BIT_CORRECTION, pp, 2 * n, 42 - CORRECTION_BITS, wsi)
-	    * (1-BIT_CORRECTION); /* if BIT_CORRECTION != 0, discard the carry. */
+  cy = DO_mpn_sublsh_n (r7 + n + BIT_CORRECTION, pp, 2 * n, 42 - CORRECTION_BITS, wsi);
 #if BIT_CORRECTION
   MPN_DECR_U (r1 + n, 2 * n + 1, pp[0] >> 6);
   cy = DO_mpn_sublsh_n (r1 + n, pp + 1, 2 * n - 1, GMP_NUMB_BITS - 6, wsi);
   cy = mpn_sub_1(r1 + 3 * n - 1, r1 + 3 * n - 1, 2, cy);
   ASSERT ( BIT_CORRECTION > 0 || cy != 0 );
 #else
+  r7[n3] -= cy;
   DO_mpn_subrsh(r1 + n, 2 * n + 1, pp, 2 * n, 6, wsi);
 #endif
 


More information about the gmp-commit mailing list