[Gmp-commit] /home/hgfiles/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 17 00:43:27 CET 2009


details:   /home/hgfiles/gmp/rev/d109b693b836
changeset: 13097:d109b693b836
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 16 23:47:26 2009 +0100
description:
Add Niels' and Marco's recent contributions.

details:   /home/hgfiles/gmp/rev/c9b1fc3a4685
changeset: 13098:c9b1fc3a4685
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 16 23:47:52 2009 +0100
description:
List more files for Niels and Marco.

details:   /home/hgfiles/gmp/rev/b4c81b29aac4
changeset: 13099:b4c81b29aac4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 17 00:36:29 2009 +0100
description:
Rewrite mpn_bdiv_q_itch.

diffstat:

 AUTHORS              |  7 +++++--
 ChangeLog            |  4 ++++
 doc/gmp.texi         |  3 ++-
 mpn/generic/bdiv_q.c |  8 +++++---
 4 files changed, 16 insertions(+), 6 deletions(-)

diffs (67 lines):

diff -r 6e0a9064f47d -r b4c81b29aac4 AUTHORS
--- a/AUTHORS	Wed Dec 16 21:31:06 2009 +0100
+++ b/AUTHORS	Thu Dec 17 00:36:29 2009 +0100
@@ -32,11 +32,14 @@
 Niels Möller		mpn/generic/hgcd2.c, gcd.c, gcdext.c, matrix22_mul.c,
 			hgcd.c, gcdext_1.c, gcd_subdiv_step.c, gcd_lehmer.c,
 			gcdext_subdiv_step.c, gcdext_lehmer.c,
-			toom_interpolate_7pts, mulmod_bnm1.c, mpz/nextprime.c.
+			toom_interpolate_7pts, mulmod_bnm1.c, dcpi1_bdiv_qr.c,
+			dcpi1_bdiv_q.c, sbpi1_bdiv_qr.c, sbpi1_bdiv_q.c,
+			mpz/nextprime.c.
 
 Marco Bodrato		mpn/generic/toom44_mul.c, toom4_sqr.c, toom53_mul.c,
 			toom62_mul.c, toom43_mul.c, toom52_mul.c,
-			toom_interpolate_6pts.c, mulmod_bnm1.c.
+			toom_interpolate_6pts.c, mulmod_bnm1.c, invert.c,
+			invertappr.c.
 
 David Harvey		mpn/x86_64/mul_basecase.asm
 
diff -r 6e0a9064f47d -r b4c81b29aac4 ChangeLog
--- a/ChangeLog	Wed Dec 16 21:31:06 2009 +0100
+++ b/ChangeLog	Thu Dec 17 00:36:29 2009 +0100
@@ -1,3 +1,7 @@
+2009-12-17  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/generic/bdiv_q.c (mpn_bdiv_q_itch): Rewrite.
+
 2009-12-16  Torbjorn Granlund  <tege at gmplib.org>
 
 	* tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul
diff -r 6e0a9064f47d -r b4c81b29aac4 doc/gmp.texi
--- a/doc/gmp.texi	Wed Dec 16 21:31:06 2009 +0100
+++ b/doc/gmp.texi	Thu Dec 17 00:36:29 2009 +0100
@@ -10356,7 +10356,8 @@
 multiplication.
 
 Marco Bodrato helped implement the new Toom multiply code for GMP 4.3 and 4.4.
-He also helped write mpn_mulmod_bnm1.
+He is the main author of the current mpn_mulmod_bnm1.  Marco also wrote
+the functions mpn_invert and mpn_invertappr.
 
 David Harvey suggested the internal function @code{mpn_bdiv_dbm1}, implementing
 division relevant to Toom multiplication.  He also worked on fast assembly
diff -r 6e0a9064f47d -r b4c81b29aac4 mpn/generic/bdiv_q.c
--- a/mpn/generic/bdiv_q.c	Wed Dec 16 21:31:06 2009 +0100
+++ b/mpn/generic/bdiv_q.c	Thu Dec 17 00:36:29 2009 +0100
@@ -27,8 +27,7 @@
 #include "gmp-impl.h"
 
 
-/* Computes Q = N / D mod B^n,
-	    destroys N.  */
+/* Computes Q = N / D mod B^n. */
 
 void
 mpn_bdiv_q (mp_ptr qp,
@@ -60,5 +59,8 @@
 mp_size_t
 mpn_bdiv_q_itch (mp_size_t nn, mp_size_t dn)
 {
-  return mpn_mu_bdiv_q_itch (nn, dn);
+  if (BELOW_THRESHOLD (dn, MU_BDIV_Q_THRESHOLD))
+    return nn;
+  else
+    return mpn_mu_bdiv_q_itch (nn, dn);
 }


More information about the gmp-commit mailing list