diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-04-06 15:21:45 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-04-06 15:21:45 +0000 |
commit | 58573c834cb2a8ef3ca1d440f92f8fe25aa57f1d (patch) | |
tree | 6a2ec21137c8065f7ed7ff382af2ff719b55a532 | |
parent | e99c945d8f23e3e45efe8fc2e9a70b14e707e9a8 (diff) | |
download | mpfr-58573c834cb2a8ef3ca1d440f92f8fe25aa57f1d.tar.gz |
[src/round_prec.c] Replaced an incorrect comment by an assertion.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12565 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/round_prec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/round_prec.c b/src/round_prec.c index 0acf825b3..fb14bb518 100644 --- a/src/round_prec.c +++ b/src/round_prec.c @@ -209,7 +209,9 @@ mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err, if (rnd2 != MPFR_RNDN) rnd2 = MPFR_IS_LIKE_RNDZ(rnd2, neg) ? MPFR_RNDZ : MPFR_RNDA; - /* now rnd2 is either RNDN, RNDZ or RNDZ */ + MPFR_ASSERTD (rnd2 == MPFR_RNDN || + rnd2 == MPFR_RNDZ || + rnd2 == MPFR_RNDA); /* For err < prec (+1 for rnd1=RNDN), we can never round correctly, since the error is at least 2*ulp(b) >= ulp(round(b)). |