[Gmp-commit] /home/hgfiles/gmp: Call mpn_divexact instead of mpn_bdiv_q.
mercurial at gmplib.org
mercurial at gmplib.org
Thu Jan 7 04:03:11 CET 2010
details: /home/hgfiles/gmp/rev/6d3e18062456
changeset: 13343:6d3e18062456
user: Torbjorn Granlund <tege at gmplib.org>
date: Thu Jan 07 00:51:21 2010 +0100
description:
Call mpn_divexact instead of mpn_bdiv_q.
diffstat:
ChangeLog | 3 +++
mpn/generic/perfpow.c | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 49908b4a94c9 -r 6d3e18062456 ChangeLog
--- a/ChangeLog Thu Jan 07 00:20:20 2010 +0100
+++ b/ChangeLog Thu Jan 07 00:51:21 2010 +0100
@@ -2,6 +2,9 @@
* Version 5.0.0 released.
+ * perfpow.c (mpn_perfect_power_p): Call mpn_divexact instead of mpn_bdiv_q (with
+ too little scratch space!).
+
From Niels Möller:
* tests/mpn/t-div.c (check_one): Get rid of the poorly managed variable
tn.
diff -r 49908b4a94c9 -r 6d3e18062456 mpn/generic/perfpow.c
--- a/mpn/generic/perfpow.c Thu Jan 07 00:20:20 2010 +0100
+++ b/mpn/generic/perfpow.c Thu Jan 07 00:51:21 2010 +0100
@@ -2,7 +2,7 @@
Contributed to the GNU project by Martin Boij.
-Copyright 2009 Free Software Foundation, Inc.
+Copyright 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -466,8 +466,7 @@
goto ret;
}
- /* divexact */
- mpn_bdiv_q (next, nc, ncn, prev, pn, tp);
+ mpn_divexact (next, nc, ncn, prev, pn);
ncn = ncn - pn;
ncn += next[ncn] != 0;
MPN_COPY (nc, next, ncn);
More information about the gmp-commit
mailing list