From 6ec10e95b44f7ed772d24fd16451c903e3ffa3ff Mon Sep 17 00:00:00 2001 From: vlefevre Date: Fri, 13 Jan 2006 14:11:41 +0000 Subject: The problem with the conversion was not completely fixed... Now OK. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4001 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tget_f.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests/tget_f.c') diff --git a/tests/tget_f.c b/tests/tget_f.c index 1e1adcce7..da1f08eae 100644 --- a/tests/tget_f.c +++ b/tests/tget_f.c @@ -22,6 +22,7 @@ MA 02110-1301, USA. */ #include #include #include +#include #include "mpfr-test.h" @@ -84,11 +85,14 @@ main (void) printf ("Error: mpfr_get_f(%lu) fails\n", i); exit (1); } - mpfr_set_si (y, - (long) i, GMP_RNDN); - if (mpfr_get_f (x, y, GMP_RNDN) || mpf_cmp_si (x, - (long) i)) + if (i <= - (unsigned long) LONG_MIN) { - printf ("Error: mpfr_get_f(-%lu) fails\n", i); - exit (1); + mpfr_set_si (y, - (long) i, GMP_RNDN); + if (mpfr_get_f (x, y, GMP_RNDN) || mpf_cmp_si (x, - (long) i)) + { + printf ("Error: mpfr_get_f(-%lu) fails\n", i); + exit (1); + } } i *= 2; } -- cgit v1.2.1