diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-05 16:18:16 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-05 16:18:16 +0000 |
commit | d406c7c3f07cacb170533149e9319c334062792b (patch) | |
tree | da17b87f0205cc16561cf4d73f95ffc893e0385d /zeta.c | |
parent | 3e4ced245d9e603cfc806e64ab56b9b2b7223287 (diff) | |
download | mpfr-d406c7c3f07cacb170533149e9319c334062792b.tar.gz |
Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0))
Optimize swap.c and copysign.c.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2536 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'zeta.c')
-rw-r--r-- | zeta.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -340,21 +340,22 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mp_rnd_t rnd_mode) MPFR_SET_NAN (z); MPFR_RET_NAN; } - if (MPFR_IS_INF(s)) + else if (MPFR_IS_INF(s)) { if (MPFR_SIGN(s) > 0) return mpfr_set_ui (z, 1, GMP_RNDN); /* Zeta(+Inf) = 1 */ MPFR_SET_NAN (z); /* Zeta(-Inf) = NaN */ MPFR_RET_NAN; } - if (MPFR_IS_ZERO(s)) + else if (MPFR_IS_ZERO(s)) { mpfr_set_ui (z, 1, rnd_mode); mpfr_div_2ui (z, z, 1, rnd_mode); MPFR_CHANGE_SIGN(z); MPFR_RET(0); } - MPFR_ASSERTN(1); + else + MPFR_ASSERTN(0); } MPFR_CLEAR_FLAGS(z); |