diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-07-14 07:47:57 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-07-14 07:47:57 +0000 |
commit | be7c174956fb9adeb40e7502b3181fb1d5b746ee (patch) | |
tree | 48a1d4b0bbf2a74d77f200ad4f61ee987dcea1fa /coth.c | |
parent | 4add7a0c33cbd04eb6f0d966d5bf051b0c3deea2 (diff) | |
download | mpfr-be7c174956fb9adeb40e7502b3181fb1d5b746ee.tar.gz |
[coth.c, tcoth.c] fixed coth(+/0) which was wrong (reported by Christopher Creutzig)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6334 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'coth.c')
-rw-r--r-- | coth.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -24,15 +24,15 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., coth (NaN) = NaN. coth (+Inf) = 1 coth (-Inf) = -1 - coth (+0) = +0. - coth (-0) = -0. + coth (+0) = +Inf. + coth (-0) = -Inf. */ #define FUNCTION mpfr_coth #define INVERSE mpfr_tanh #define ACTION_NAN(y) do { MPFR_SET_NAN(y); MPFR_RET_NAN; } while (1) #define ACTION_INF(y) return mpfr_set_si (y, MPFR_IS_POS(x) ? 1 : -1, rnd_mode) -#define ACTION_ZERO(y,x) do { MPFR_SET_SAME_SIGN(y,x); MPFR_SET_ZERO(y); \ +#define ACTION_ZERO(y,x) do { MPFR_SET_SAME_SIGN(y,x); MPFR_SET_INF(y); \ MPFR_RET(0); } while (1) /* We know |coth(x)| > 1, thus if the approximation z is such that |