summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-08-03 13:20:47 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-08-03 13:20:47 +0000
commitf8f5c6bedf76ceef1c50e3f99730d5293b15a95b (patch)
tree7c510279394c76e4dfc767d6d64fa3cccd2d285b
parent56a62f48c4ca4d347c8393513c8f72e33129825c (diff)
downloadmpfr-f8f5c6bedf76ceef1c50e3f99730d5293b15a95b.tar.gz
[tests/tget_flt.c] Code style: replaced "… == 0" by "! …" on
the Boolean _p functions. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14557 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tget_flt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tget_flt.c b/tests/tget_flt.c
index 04975c004..ac5020c57 100644
--- a/tests/tget_flt.c
+++ b/tests/tget_flt.c
@@ -82,7 +82,7 @@ main (void)
exit (1);
}
mpfr_set_flt (x, f, MPFR_RNDN);
- if (mpfr_nan_p (x) == 0)
+ if (! mpfr_nan_p (x))
{
printf ("Error for mpfr_set_flt(NaN)\n");
exit (1);
@@ -91,7 +91,7 @@ main (void)
mpfr_set_inf (x, 1);
f = mpfr_get_flt (x, MPFR_RNDN);
mpfr_set_flt (x, f, MPFR_RNDN);
- if (mpfr_inf_p (x) == 0 || mpfr_sgn (x) < 0)
+ if (! mpfr_inf_p (x) || mpfr_sgn (x) < 0)
{
printf ("Error for mpfr_set_flt(mpfr_get_flt(+Inf)):\n");
printf ("f=%f, expected -Inf\n", f);
@@ -102,7 +102,7 @@ main (void)
mpfr_set_inf (x, -1);
f = mpfr_get_flt (x, MPFR_RNDN);
mpfr_set_flt (x, f, MPFR_RNDN);
- if (mpfr_inf_p (x) == 0 || mpfr_sgn (x) > 0)
+ if (! mpfr_inf_p (x) || mpfr_sgn (x) > 0)
{
printf ("Error for mpfr_set_flt(mpfr_get_flt(-Inf)):\n");
printf ("f=%f, expected -Inf\n", f);
@@ -114,7 +114,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_IS_NEG (x))
+ if (! mpfr_zero_p (x) || MPFR_IS_NEG (x))
{
printf ("Error for mpfr_set_flt(mpfr_get_flt(+0))\n");
exit (1);
@@ -125,7 +125,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_IS_POS (x))
+ if (! mpfr_zero_p (x) || MPFR_IS_POS (x))
{
printf ("Error for mpfr_set_flt(mpfr_get_flt(-0))\n");
exit (1);