[Gmp-commit] /var/hg/gmp: Fixed ASSERT.
mercurial at gmplib.org
mercurial at gmplib.org
Mon May 2 06:46:32 CEST 2011
details: /var/hg/gmp/rev/d4470f527257
changeset: 14155:d4470f527257
user: Niels M?ller <nisse at lysator.liu.se>
date: Mon May 02 06:46:28 2011 +0200
description:
Fixed ASSERT.
diffstat:
ChangeLog | 4 ++++
mpn/generic/div_qr_2u_pi1.c | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r e0d9ed336b2e -r d4470f527257 ChangeLog
--- a/ChangeLog Sun May 01 15:53:26 2011 +0200
+++ b/ChangeLog Mon May 02 06:46:28 2011 +0200
@@ -1,3 +1,7 @@
+2011-05-01 Niels Möller <nisse at lysator.liu.se>
+
+ * mpn/generic/div_qr_2u_pi1.c (mpn_div_qr_2u_pi1): Fixed ASSERT.
+
2011-04-30 Marc Glisse <marc.glisse at inria.fr>
* gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition
diff -r e0d9ed336b2e -r d4470f527257 mpn/generic/div_qr_2u_pi1.c
--- a/mpn/generic/div_qr_2u_pi1.c Sun May 01 15:53:26 2011 +0200
+++ b/mpn/generic/div_qr_2u_pi1.c Mon May 02 06:46:28 2011 +0200
@@ -30,7 +30,8 @@
#include "longlong.h"
-/* 3/2 loop, for unnormalized divisor */
+/* 3/2 loop, for unnormalized divisor. Caller must pass shifted d1 and
+ d0, while {np,nn} is shifted on the fly. */
mp_limb_t
mpn_div_qr_2u_pi1 (mp_ptr qp, mp_ptr rp, mp_srcptr np, mp_size_t nn,
mp_limb_t d1, mp_limb_t d0, int shift, mp_limb_t di)
@@ -40,7 +41,7 @@
mp_size_t i;
ASSERT (nn >= 2);
- ASSERT (!(d1 & GMP_NUMB_HIGHBIT));
+ ASSERT (d1 & GMP_NUMB_HIGHBIT);
ASSERT (shift > 0);
r2 = np[nn-1] >> (GMP_LIMB_BITS - shift);
More information about the gmp-commit
mailing list