diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-03 01:59:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-03 01:59:06 +0000 |
commit | cb12c316454fa4125fc8976d7d4d6ca5874d6e10 (patch) | |
tree | 5731088334ed2802390656388fc1d63451ff5304 /tests/tconst_log2.c | |
parent | 4254f072e366e547b9853ecc1e6a152bc4b3b417 (diff) | |
download | mpfr-cb12c316454fa4125fc8976d7d4d6ca5874d6e10.tar.gz |
Style: use RND_LOOP; mpfr_can_round returns a Boolean-like value.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9920 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tconst_log2.c')
-rw-r--r-- | tests/tconst_log2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/tconst_log2.c b/tests/tconst_log2.c index 3136636c8..3d029a1cb 100644 --- a/tests/tconst_log2.c +++ b/tests/tconst_log2.c @@ -41,11 +41,11 @@ check (mpfr_prec_t p0, mpfr_prec_t p1) { mpfr_set_prec (x, p0); mpfr_set_prec (y, p0); - for (rnd = 0; rnd < MPFR_RND_MAX; rnd++) + RND_LOOP (rnd) { inex = mpfr_const_log2 (x, rnd); inex_ref = mpfr_set (y, z, rnd); - if (mpfr_can_round (z, mpfr_get_prec (z), MPFR_RNDN, rnd, p0) == 0) + if (! mpfr_can_round (z, mpfr_get_prec (z), MPFR_RNDN, rnd, p0)) { printf ("increase guard precision in check()\n"); exit (1); |