summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2020-10-29 18:18:13 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2020-10-29 18:18:13 +0100
commitfa64eb03840b23634054ea379271988a41097324 (patch)
tree13d8bff7df0d7df28292f545bbfbe9e48e8ac4bc /tests
parentf185058a4bd52f62745a6813635733637bcd23de (diff)
downloadgmp-fa64eb03840b23634054ea379271988a41097324.tar.gz
tests/mpf/t-get_d_2exp.c: Test also the case zero
Diffstat (limited to 'tests')
-rw-r--r--tests/mpf/t-get_d_2exp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/mpf/t-get_d_2exp.c b/tests/mpf/t-get_d_2exp.c
index 6868bf3d2..5449d1895 100644
--- a/tests/mpf/t-get_d_2exp.c
+++ b/tests/mpf/t-get_d_2exp.c
@@ -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 @@ check_data (void)
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;