summaryrefslogtreecommitdiff
path: root/tan.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-10-15 14:01:18 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-10-15 14:01:18 +0000
commitd725f8a09f2be6ed3135f95fdd7290a41e69cff5 (patch)
tree698606bf80fcdb0dcebc07fcfc74a506fcb17dc3 /tan.c
parent3813ed49eca07ed50b6bfbdcea354da7a1fa6ddf (diff)
downloadmpfr-d725f8a09f2be6ed3135f95fdd7290a41e69cff5.tar.gz
implement ternary inexact flag
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1247 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tan.c')
-rw-r--r--tan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tan.c b/tan.c
index 2f0bc5559..580cc5924 100644
--- a/tan.c
+++ b/tan.c
@@ -36,7 +36,7 @@ mpfr_tan (y, x, rnd_mode)
mp_rnd_t rnd_mode;
#endif
{
- int precy, m, ok, e;
+ int precy, m, ok, e, inexact;
mpfr_t c;
if (MPFR_IS_NAN(x) || MPFR_IS_INF(x))
@@ -47,7 +47,7 @@ mpfr_tan (y, x, rnd_mode)
if (!MPFR_NOTZERO(x))
{
- mpfr_set_ui(y, 0, GMP_RNDN);
+ mpfr_set_ui (y, 0, GMP_RNDN);
return 0; /* exact */
}
@@ -81,9 +81,9 @@ mpfr_tan (y, x, rnd_mode)
}
while (!ok);
- mpfr_set (y, c, rnd_mode);
+ inexact = mpfr_set (y, c, rnd_mode);
mpfr_clear (c);
- return 1; /* inexact */
+ return inexact;
}