From 1df259220eb5bf13804a69312adc760057d2ce4c Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 25 Jun 2014 13:15:40 +0000 Subject: =?UTF-8?q?Use=20MPFR=5FIS=5FNEG=20and=20MPFR=5FIS=5FPOS=20instead?= =?UTF-8?q?=20of=20comparing=20the=20sign=20with=200.=20Done=20with=20=20?= =?UTF-8?q?=20perl=20-pi=20-e=20'=20=20=20=20=20s/MPFR=5FSIGN=20*\(([^)]+)?= =?UTF-8?q?\)=20*<=3D=3F=20*0/MPFR=5FIS=5FNEG=20($1)/g;=20=20=20=20=20s/MP?= =?UTF-8?q?FR=5FSIGN=20*\(([^)]+)\)=20*>=3D=3F=20*0/MPFR=5FIS=5FPOS=20($1)?= =?UTF-8?q?/g;=20=20=20=20=20'=20{src,tests}/*.{c,h}=20and=20some=20manual?= =?UTF-8?q?=20changes.?= git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9092 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tget_flt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/tget_flt.c') diff --git a/tests/tget_flt.c b/tests/tget_flt.c index 2a81b9d5e..87f535f08 100644 --- a/tests/tget_flt.c +++ b/tests/tget_flt.c @@ -92,7 +92,7 @@ main (void) mpfr_set_ui (x, 0, MPFR_RNDN); f = mpfr_get_flt (x, MPFR_RNDN); mpfr_set_flt (x, f, MPFR_RNDN); - if (mpfr_zero_p (x) == 0 || MPFR_SIGN (x) < 0) + if (mpfr_zero_p (x) == 0 || MPFR_IS_NEG (x)) { printf ("Error for mpfr_set_flt(mpfr_get_flt(+0))\n"); exit (1); @@ -103,7 +103,7 @@ main (void) mpfr_neg (x, x, MPFR_RNDN); f = mpfr_get_flt (x, MPFR_RNDN); mpfr_set_flt (x, f, MPFR_RNDN); - if (mpfr_zero_p (x) == 0 || MPFR_SIGN (x) > 0) + if (mpfr_zero_p (x) == 0 || MPFR_IS_POS (x)) { printf ("Error for mpfr_set_flt(mpfr_get_flt(-0))\n"); exit (1); -- cgit v1.2.1