[Gmp-commit] /var/hg/gmp-5.0: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Fri Jul 15 13:44:05 CEST 2011


details:   /var/hg/gmp-5.0/rev/538dfce27f41
changeset: 13486:538dfce27f41
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jul 15 13:43:41 2011 +0200
description:
(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right.

details:   /var/hg/gmp-5.0/rev/ba05dbf85994
changeset: 13487:ba05dbf85994
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jul 15 13:43:49 2011 +0200
description:
*** empty log message ***

diffstat:

 ChangeLog                  |  5 +++++
 mpn/generic/dcpi1_bdiv_q.c |  5 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 03ed209dd7ef -r ba05dbf85994 ChangeLog
--- a/ChangeLog	Thu Jun 16 12:22:24 2011 +0200
+++ b/ChangeLog	Fri Jul 15 13:43:49 2011 +0200
@@ -1,3 +1,8 @@
+2011-07-14  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/generic/dcpi1_bdiv_q.c (mpn_dcpi1_bdiv_q): Get mpn_sub_1 size
+	argument right.
+
 2011-06-16  Torbjorn Granlund  <tege at gmplib.org>
 
 	* acinclude.m4 (GMP_ASM_RODATA): Fix typo in 2011-04-10 change.
diff -r 03ed209dd7ef -r ba05dbf85994 mpn/generic/dcpi1_bdiv_q.c
--- a/mpn/generic/dcpi1_bdiv_q.c	Thu Jun 16 12:22:24 2011 +0200
+++ b/mpn/generic/dcpi1_bdiv_q.c	Fri Jul 15 13:43:49 2011 +0200
@@ -7,7 +7,7 @@
    SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE.
 
-Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -28,7 +28,6 @@
 #include "gmp-impl.h"
 
 
-
 mp_size_t
 mpn_dcpi1_bdiv_q_n_itch (mp_size_t n)
 {
@@ -130,7 +129,7 @@
       qn = nn - qn;
       while (qn > dn)
 	{
-	  mpn_sub_1 (np + dn, np + dn, qn, cy);
+	  mpn_sub_1 (np + dn, np + dn, qn - dn, cy);
 	  cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp);
 	  qp += dn;
 	  np += dn;


More information about the gmp-commit mailing list