summaryrefslogtreecommitdiff
path: root/sin.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-02-02 15:49:20 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-02-02 15:49:20 +0000
commitfbc75c559af1634febeef27721ac6aeb8a745f25 (patch)
tree7b33c8b75e1ecc43a60b56b4f0e532a2a2e83f14 /sin.c
parent8137dfda0fbd4c5d8784a7f2ccd6c1ac142e3898 (diff)
downloadmpfr-fbc75c559af1634febeef27721ac6aeb8a745f25.tar.gz
Move mpfr_nexttozero and mpfr_nexttoinf from static to mpfr-impl.
Use them in sub1 and sin. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3260 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sin.c')
-rw-r--r--sin.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sin.c b/sin.c
index 86cdb6806..8c32c8297 100644
--- a/sin.c
+++ b/sin.c
@@ -136,11 +136,8 @@ mpfr_sin (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
for (loop = 1 ;; loop++)
{
- mpfr_cos (c, x, GMP_RNDZ);
- if (MPFR_IS_POS (c))
- mpfr_nextabove (c);
- else
- mpfr_nextbelow (c);
+ mpfr_cos (c, x, GMP_RNDZ); /* can't be exact */
+ mpfr_nexttoinf (c);
/* now c = cos(x) rounded away */
mpfr_mul (c, c, c, GMP_RNDU); /* away */
mpfr_ui_sub (c, 1, c, GMP_RNDZ);