diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-02 16:24:28 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-02 16:24:28 +0000 |
commit | d73c3d77865854463807586db1a12bb157a4ec78 (patch) | |
tree | 9852e43106da8f5eb606009cfca31b1390a0e661 /src/sin_cos.c | |
parent | 666e80146febdac13132b2c147f5780f871605d1 (diff) | |
download | mpfr-d73c3d77865854463807586db1a12bb157a4ec78.tar.gz |
mpfr_can_round -> MPFR_CAN_ROUND
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9917 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sin_cos.c')
-rw-r--r-- | src/sin_cos.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sin_cos.c b/src/sin_cos.c index 736a5d45a..2dbefd16c 100644 --- a/src/sin_cos.c +++ b/src/sin_cos.c @@ -174,11 +174,10 @@ mpfr_sin_cos (mpfr_ptr y, mpfr_ptr z, mpfr_srcptr x, mpfr_rnd_t rnd_mode) err = m; else err = MPFR_GET_EXP (c) + (mpfr_exp_t) (m - 3); - if (!mpfr_can_round (c, err, MPFR_RNDN, MPFR_RNDZ, - MPFR_PREC (z) + (rnd_mode == MPFR_RNDN))) + if (!MPFR_CAN_ROUND (c, err, MPFR_PREC (z), rnd_mode)) goto next_step; - /* we can't set z now, because in case z = x, and the mpfr_can_round() + /* we can't set z now, because in case z = x, and the MPFR_CAN_ROUND() call below fails, we will have clobbered the input */ mpfr_set_prec (xr, MPFR_PREC(c)); mpfr_swap (xr, c); /* save the approximation of the cosine in xr */ @@ -197,8 +196,7 @@ mpfr_sin_cos (mpfr_ptr y, mpfr_ptr z, mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* the absolute error on c is at most 2^(err-m), which we must put in the form 2^(EXP(c)-err). */ err = MPFR_GET_EXP (c) + (mpfr_exp_t) m - err; - if (mpfr_can_round (c, err, MPFR_RNDN, MPFR_RNDZ, - MPFR_PREC (y) + (rnd_mode == MPFR_RNDN))) + if (MPFR_CAN_ROUND (c, err, MPFR_PREC (y), rnd_mode)) break; /* check for huge cancellation */ if (err < (mpfr_exp_t) MPFR_PREC (y)) |