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

mercurial at gmplib.org mercurial at gmplib.org
Thu Oct 29 17:18:50 UTC 2020


details:   /var/hg/gmp/rev/1ea7cc64e543
changeset: 18121:1ea7cc64e543
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Oct 29 18:17:11 2020 +0100
description:
tests/mpf/t-trunc.c: Use mpf_size.

details:   /var/hg/gmp/rev/e3fe3c0e00be
changeset: 18122:e3fe3c0e00be
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Oct 29 18:17:57 2020 +0100
description:
tests/mpz/t-get_d.c: Test also the case zero.

details:   /var/hg/gmp/rev/d87ce07a6691
changeset: 18123:d87ce07a6691
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Oct 29 18:18:13 2020 +0100
description:
tests/mpf/t-get_d_2exp.c: Test also the case zero

details:   /var/hg/gmp/rev/69ec85f26787
changeset: 18124:69ec85f26787
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Oct 29 18:18:37 2020 +0100
description:
ChangeLog

diffstat:

 ChangeLog                |   6 ++++++
 tests/mpf/t-get_d_2exp.c |  12 +++++++++++-
 tests/mpf/t-trunc.c      |   4 ++--
 tests/mpz/t-get_d.c      |   9 ++++++++-
 4 files changed, 27 insertions(+), 4 deletions(-)

diffs (86 lines):

diff -r 2acab08f7797 -r 69ec85f26787 ChangeLog
--- a/ChangeLog	Thu Oct 29 07:43:03 2020 +0100
+++ b/ChangeLog	Thu Oct 29 18:18:37 2020 +0100
@@ -1,3 +1,9 @@
+2020-10-30 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* tests/mpf/t-get_d_2exp.c: Test also the case zero.
+	* tests/mpz/t-get_d.c: Likewise.
+	* tests/mpf/t-trunc.c: Use mpf_size.
+
 2020-10-29 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpz/aors_ui.h: REALLOC with extra limb only when needed.
diff -r 2acab08f7797 -r 69ec85f26787 tests/mpf/t-get_d_2exp.c
--- a/tests/mpf/t-get_d_2exp.c	Thu Oct 29 07:43:03 2020 +0100
+++ b/tests/mpf/t-get_d_2exp.c	Thu Oct 29 18:18:37 2020 +0100
@@ -1,6 +1,6 @@
 /* Test mpf_get_d_2exp.
 
-Copyright 2002, 2003, 2017 Free Software Foundation, Inc.
+Copyright 2002, 2003, 2017, 2020 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -39,6 +39,16 @@
 
   mpf_init2 (f, 3);
 
+  got = mpf_get_d_2exp (&got_exp, f);
+  if (got != 0 || got_exp != 0)
+    {
+      printf    ("mpf_get_d_2exp wrong on zero\n", exp);
+      mpf_trace ("   f    ", f);
+      d_trace   ("   got  ", got);
+      printf    ("   got exp  %ld\n", got_exp);
+      abort();
+    }
+
   for (exp = -513; exp <= 513; exp++)
     {
       size_t i;
diff -r 2acab08f7797 -r 69ec85f26787 tests/mpf/t-trunc.c
--- a/tests/mpf/t-trunc.c	Thu Oct 29 07:43:03 2020 +0100
+++ b/tests/mpf/t-trunc.c	Thu Oct 29 18:18:37 2020 +0100
@@ -1,6 +1,6 @@
 /* Test mpf_trunc, mpf_ceil, mpf_floor.
 
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2020 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -78,7 +78,7 @@
 
   /* Can't do these unconditionally in case truncation by mpf_set strips
      some low non-zero limbs which would have rounded the result.  */
-  if (ABSIZ(src) <= PREC(trunc)+1)
+  if (mpf_size (src) <= PREC(trunc)+1)
     {
       CHECK_INPLACE ("mpf_ceil",  mpf_ceil,  ceil);
       CHECK_INPLACE ("mpf_floor", mpf_floor, floor);
diff -r 2acab08f7797 -r 69ec85f26787 tests/mpz/t-get_d.c
--- a/tests/mpz/t-get_d.c	Thu Oct 29 07:43:03 2020 +0100
+++ b/tests/mpz/t-get_d.c	Thu Oct 29 18:18:37 2020 +0100
@@ -1,6 +1,6 @@
 /* Test mpz_get_d.
 
-Copyright 2002, 2012 Free Software Foundation, Inc.
+Copyright 2002, 2012, 2020 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -38,6 +38,13 @@
 
   mpz_init (z);
 
+  got = mpz_get_d (z);
+  if (got != 0)
+    {
+      printf    ("mpz_get_d wrong on zero\n");
+      abort();
+    }
+
   mpz_set_ui (z, 1L);
   want = 1.0;
 



More information about the gmp-commit mailing list