From fa64eb03840b23634054ea379271988a41097324 Mon Sep 17 00:00:00 2001 From: Marco Bodrato Date: Thu, 29 Oct 2020 18:18:13 +0100 Subject: tests/mpf/t-get_d_2exp.c: Test also the case zero --- tests/mpf/t-get_d_2exp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') 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; -- cgit v1.2.1