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

mercurial at gmplib.org mercurial at gmplib.org
Sun Nov 1 13:58:06 UTC 2015


details:   /var/hg/gmp/rev/c460710e9b41
changeset: 16924:c460710e9b41
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 01 14:56:35 2015 +0100
description:
tests/mpf/t-pow_ui.c: Use another mpf for the size limit.

details:   /var/hg/gmp/rev/c7de672b1827
changeset: 16925:c7de672b1827
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 01 14:57:45 2015 +0100
description:
NEWS: remove mention to minor changes (as we ignore many minor other aspects)

details:   /var/hg/gmp/rev/89a2bc9b845c
changeset: 16926:89a2bc9b845c
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 01 14:57:58 2015 +0100
description:
ChangeLog

diffstat:

 ChangeLog            |   1 +
 NEWS                 |   2 --
 tests/mpf/t-pow_ui.c |  10 ++++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

diffs (58 lines):

diff -r 6d4a34045ee8 -r 89a2bc9b845c ChangeLog
--- a/ChangeLog	Sun Nov 01 07:04:47 2015 +0100
+++ b/ChangeLog	Sun Nov 01 14:57:58 2015 +0100
@@ -4,6 +4,7 @@
 
 	* mpz/inits.c [__CHECKER__]: Init limb, not pointer.
 	* mpz/init.c [__CHECKER__]: Likewise (spotted by Vicente Benjumea).
+	* tests/mpf/t-pow_ui.c: Use another mpf for the size limit.
 
 2015-10-30  Torbjörn Granlund  <torbjorng at google.com>
 
diff -r 6d4a34045ee8 -r 89a2bc9b845c NEWS
--- a/NEWS	Sun Nov 01 07:04:47 2015 +0100
+++ b/NEWS	Sun Nov 01 14:57:58 2015 +0100
@@ -64,8 +64,6 @@
 
   * Small improvements and better coverage for the test suite.
 
-  * Minor portability enhancements.
-
   * The various FreeBSD problems listed for 6.0.0 affect this release too.
 
   * Tuned values for FFT multiplications are provided for larger number on
diff -r 6d4a34045ee8 -r 89a2bc9b845c tests/mpf/t-pow_ui.c
--- a/tests/mpf/t-pow_ui.c	Sun Nov 01 07:04:47 2015 +0100
+++ b/tests/mpf/t-pow_ui.c	Sun Nov 01 14:57:58 2015 +0100
@@ -28,12 +28,14 @@
 check_data (void)
 {
   unsigned int b, e;
-  mpf_t b1, r, r2;
+  mpf_t b1, r, r2, limit;
 
   mpf_inits (b1, r, r2, NULL);
+  mpf_init_set_ui (limit, 1);
+  mpf_mul_2exp (limit, limit, MAX (GMP_NUMB_BITS, 53)); 
 
   /* This test just test integers with results that fit in a single
-     limb.  This avoid any rounding.  */
+     limb or 53 bits.  This avoids any rounding.  */
 
   for (b = 0; b <= 400; b++)
     {
@@ -48,12 +50,12 @@
 
 	  mpf_mul_ui (r2, r2, b);
 
-	  if (mpf_cmp_ui (r2, GMP_NUMB_MAX) > 0)
+	  if (mpf_cmp (r2, limit) >= 0)
 	    break;
 	}
     }
 
-  mpf_clears (b1, r, r2, NULL);
+  mpf_clears (b1, r, r2, limit, NULL);
 }
 
 int


More information about the gmp-commit mailing list