[Gmp-commit] /var/hg/gmp: Correct ASSERT.

mercurial at gmplib.org mercurial at gmplib.org
Sun Aug 27 22:23:48 UTC 2017


details:   /var/hg/gmp/rev/d2f1747491ad
changeset: 17492:d2f1747491ad
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Mon Aug 28 00:23:46 2017 +0200
description:
Correct ASSERT.

diffstat:

 mpn/generic/sbpi1_bdiv_q.c  |  2 +-
 mpn/generic/sbpi1_bdiv_qr.c |  2 +-
 mpn/generic/sbpi1_bdiv_r.c  |  2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 1e7ec7cf42e0 -r d2f1747491ad mpn/generic/sbpi1_bdiv_q.c
--- a/mpn/generic/sbpi1_bdiv_q.c	Fri Aug 18 02:31:09 2017 +0200
+++ b/mpn/generic/sbpi1_bdiv_q.c	Mon Aug 28 00:23:46 2017 +0200
@@ -55,7 +55,7 @@
   ASSERT (dn > 0);
   ASSERT (un >= dn);
   ASSERT ((dp[0] & 1) != 0);
-  ASSERT ((dp[0] * dinv) == 0);
+  ASSERT (-(dp[0] * dinv) == 1);
   ASSERT (up == qp || !MPN_OVERLAP_P (up, un, qp, un - dn));
 
   if (un > dn)
diff -r 1e7ec7cf42e0 -r d2f1747491ad mpn/generic/sbpi1_bdiv_qr.c
--- a/mpn/generic/sbpi1_bdiv_qr.c	Fri Aug 18 02:31:09 2017 +0200
+++ b/mpn/generic/sbpi1_bdiv_qr.c	Mon Aug 28 00:23:46 2017 +0200
@@ -61,7 +61,7 @@
   ASSERT (dn > 0);
   ASSERT (un > dn);
   ASSERT ((dp[0] & 1) != 0);
-  ASSERT ((dp[0] * dinv) == 0);
+  ASSERT (-(dp[0] * dinv) == 1);
   ASSERT (up == qp || !MPN_OVERLAP_P (up, un, qp, un - dn));
 
   for (i = un - dn, cy = 0; i != 0; i--)
diff -r 1e7ec7cf42e0 -r d2f1747491ad mpn/generic/sbpi1_bdiv_r.c
--- a/mpn/generic/sbpi1_bdiv_r.c	Fri Aug 18 02:31:09 2017 +0200
+++ b/mpn/generic/sbpi1_bdiv_r.c	Mon Aug 28 00:23:46 2017 +0200
@@ -60,7 +60,7 @@
   ASSERT (dn > 0);
   ASSERT (un > dn);
   ASSERT ((dp[0] & 1) != 0);
-  ASSERT ((dp[0] * dinv) == 0);
+  ASSERT (-(dp[0] * dinv) == 1);
 
   for (i = un - dn, cy = 0; i != 0; i--)
     {


More information about the gmp-commit mailing list