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

mercurial at gmplib.org mercurial at gmplib.org
Wed Apr 25 12:38:56 CEST 2012


details:   /var/hg/gmp/rev/2202c468e52e
changeset: 14889:2202c468e52e
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Wed Apr 25 12:22:40 2012 +0200
description:
old Changelog

details:   /var/hg/gmp/rev/a011989877d6
changeset: 14890:a011989877d6
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Wed Apr 25 12:23:29 2012 +0200
description:
tests/cxx/t-ops2.cc: Improve coverage (the cheap way).

details:   /var/hg/gmp/rev/2ec2d1ad4f9e
changeset: 14891:2ec2d1ad4f9e
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Wed Apr 25 12:38:39 2012 +0200
description:
mpz/bin_uiui.c (bc_bin_uiui): Nail support.

diffstat:

 ChangeLog           |  4 ++++
 mpz/bin_uiui.c      |  5 +++--
 tests/cxx/t-ops2.cc |  3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r 102bbf2a7657 -r 2ec2d1ad4f9e ChangeLog
--- a/ChangeLog	Tue Apr 24 20:53:26 2012 +0200
+++ b/ChangeLog	Wed Apr 25 12:38:39 2012 +0200
@@ -27,6 +27,10 @@
 	* mpz/oddfac_1.c: Use generated constant.
 	* mpz/bin_ui.c: Small optimisations.
 
+	* tune/common.c (speed_mpz_bin_ui): New function.
+	* tune/speed.h: Declare it.
+	* tune/speed.c: Use it.
+
 2012-04-21  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/arm/mul_1.asm: Cleanup.
diff -r 102bbf2a7657 -r 2ec2d1ad4f9e mpz/bin_uiui.c
--- a/mpz/bin_uiui.c	Tue Apr 24 20:53:26 2012 +0200
+++ b/mpz/bin_uiui.c	Wed Apr 25 12:38:39 2012 +0200
@@ -368,8 +368,9 @@
 static mp_limb_t
 bc_bin_uiui (unsigned int n, unsigned int k)
 {
-  return (fac[n] * facinv[k - 2] * facinv[n - k - 2])
-    << (fac2cnt[n / 2 - 1] - fac2cnt[k / 2 - 1] - fac2cnt[(n-k) / 2 - 1]);
+  return ((fac[n] * facinv[k - 2] * facinv[n - k - 2])
+    << (fac2cnt[n / 2 - 1] - fac2cnt[k / 2 - 1] - fac2cnt[(n-k) / 2 - 1]))
+    & GMP_NUMB_MASK;
 }
 
 /* Algorithm:
diff -r 102bbf2a7657 -r 2ec2d1ad4f9e tests/cxx/t-ops2.cc
--- a/tests/cxx/t-ops2.cc	Tue Apr 24 20:53:26 2012 +0200
+++ b/tests/cxx/t-ops2.cc	Wed Apr 25 12:38:39 2012 +0200
@@ -1,6 +1,6 @@
 /* Test mp*_class operators and functions.
 
-Copyright 2011 Free Software Foundation, Inc.
+Copyright 2011, 2012 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -140,6 +140,7 @@
   CHECK_ALL(T,5.,2,-); CHECK_MPZ(T,5.,2,-);
   CHECK_ALL(T,5.,2,*); CHECK_MPZ(T,5.,2,*);
   CHECK_ALL(T,5.,2,/); CHECK_MPZ(T,5.,2,/);
+  CHECK_ALL(T,0.,2,/);
   CHECK_ALL_SIGNS(T,11.,3,+);
   CHECK_ALL_SIGNS(T,11.,3,-);
   CHECK_ALL_SIGNS(T,11.,3,*);


More information about the gmp-commit mailing list