summaryrefslogtreecommitdiff
path: root/coth.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2006-10-26 13:55:26 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2006-10-26 13:55:26 +0000
commitee27b36a0d6bdb0e452281b1bc6dab12ca7b8b7c (patch)
treec33058ce6d206d329585d81e6dfd9f6ce52b1769 /coth.c
parente48cbb550188875c5006d1ff33799ef24008f21b (diff)
downloadmpfr-ee27b36a0d6bdb0e452281b1bc6dab12ca7b8b7c.tar.gz
fixed dummy error in last commit
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4165 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'coth.c')
-rw-r--r--coth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coth.c b/coth.c
index 930fe6131..51aafb0f6 100644
--- a/coth.c
+++ b/coth.c
@@ -40,10 +40,11 @@ MA 02110-1301, USA. */
#define ACTION_SPECIAL \
if (MPFR_GET_EXP(z) == 1) /* 1 <= |z| < 2 */ \
{ \
- mpfr_sub_ui (z, z, MPFR_SIGN(z) > 0 ? 1 : -1, GMP_RNDN); \
+ /* the following is exact by Sterbenz theorem */ \
+ mpfr_sub_si (z, z, MPFR_SIGN(z) > 0 ? 1 : -1, GMP_RNDN); \
if (MPFR_IS_ZERO(z) || MPFR_GET_EXP(z) <= - (mp_exp_t) precy) \
{ \
- mpfr_add_ui (z, z, MPFR_SIGN(z) > 0 ? 1 : -1, GMP_RNDN); \
+ mpfr_add_si (z, z, MPFR_SIGN(z) > 0 ? 1 : -1, GMP_RNDN); \
break; \
} \
}