summaryrefslogtreecommitdiff
path: root/acos.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-14 11:49:06 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-14 11:49:06 +0000
commit1fa2277c10582baa8b8402b8cf1702116ccbc560 (patch)
tree672209195ecad922dc489260098588b4dca469ad /acos.c
parent51aef80e83eaf2fc76dd6be59c0549e890dccd2b (diff)
downloadmpfr-1fa2277c10582baa8b8402b8cf1702116ccbc560.tar.gz
replaced mpfr_can_round (approx, err, rnd1, GMP_RNDN, prec)
by mpfr_can_round (approx, err, rnd1, GMP_RNDZ, prec + 1) which in addition guarantees a correct inexact flag git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2492 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acos.c')
-rw-r--r--acos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/acos.c b/acos.c
index 1210f2c49..093734b65 100644
--- a/acos.c
+++ b/acos.c
@@ -108,7 +108,8 @@ mpfr_acos (mpfr_ptr acos, mpfr_srcptr x, mp_rnd_t rnd_mode)
mpfr_div_2ui (tmp, tmp, 1, GMP_RNDN);
mpfr_sub (arcc, tmp, arcc, GMP_RNDN);
- if (mpfr_can_round (arcc, realprec, GMP_RNDN, rnd_mode, MPFR_PREC(acos)))
+ if (mpfr_can_round (arcc, realprec, GMP_RNDN, GMP_RNDZ,
+ MPFR_PREC(acos) + (rnd_mode == GMP_RNDN)))
{
inexact = mpfr_set (acos, arcc, rnd_mode);
good = 1;