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

mercurial at gmplib.org mercurial at gmplib.org
Mon Nov 26 18:59:11 CET 2012


details:   /var/hg/gmp/rev/d7acc514ef00
changeset: 15139:d7acc514ef00
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Nov 26 18:59:00 2012 +0100
description:
(checkz): Reduce huge numbers to avoid vax overflow.

details:   /var/hg/gmp/rev/34fea7a40b3a
changeset: 15140:34fea7a40b3a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Nov 26 18:59:05 2012 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog           |  5 +++++
 tests/cxx/t-ops2.cc |  8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 33cc6c412ef4 -r 34fea7a40b3a ChangeLog
--- a/ChangeLog	Sun Nov 25 21:58:17 2012 +0100
+++ b/ChangeLog	Mon Nov 26 18:59:05 2012 +0100
@@ -1,3 +1,8 @@
+2012-11-26  Torbjorn Granlund  <tege at gmplib.org>
+
+	* tests/cxx/t-ops2.cc (checkz): Reduce huge numbers to avoid vax
+	overflow.
+
 2012-11-25  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/generic/get_d.c: Reinsert non-IEEE code.
diff -r 33cc6c412ef4 -r 34fea7a40b3a tests/cxx/t-ops2.cc
--- a/tests/cxx/t-ops2.cc	Sun Nov 25 21:58:17 2012 +0100
+++ b/tests/cxx/t-ops2.cc	Mon Nov 26 18:59:05 2012 +0100
@@ -103,10 +103,10 @@
   CHECK_ALL_SIGNS(mpz_class,17,2,%);
   CHECK(unsigned long,mpz_class,5,-2,/);
   CHECK(unsigned long,mpz_class,5,-2,%);
-  ASSERT_ALWAYS(7ul/mpz_class(1e100)==0);
-  ASSERT_ALWAYS(7ul%mpz_class(1e100)==7);
-  ASSERT_ALWAYS(7ul/mpz_class(-1e100)==0);
-  ASSERT_ALWAYS(7ul%mpz_class(-1e100)==7);
+  ASSERT_ALWAYS(7ul/mpz_class(1e35)==0);
+  ASSERT_ALWAYS(7ul%mpz_class(1e35)==7);
+  ASSERT_ALWAYS(7ul/mpz_class(-1e35)==0);
+  ASSERT_ALWAYS(7ul%mpz_class(-1e35)==7);
   CHECK_ALL_SIGNS_COMPARISONS(mpz_class,11,3);
   CHECK_ALL(mpz_class,6,3,&);
   CHECK_ALL(mpz_class,6,3,|);


More information about the gmp-commit mailing list