From 5d8fcc6938422553d0f4661ec601cac408062590 Mon Sep 17 00:00:00 2001 From: zimmerma Date: Thu, 12 Feb 2004 12:54:48 +0000 Subject: improved coverage test git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2684 280ebfd0-de03-0410-8827-d642c229c3f4 --- erf.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'erf.c') diff --git a/erf.c b/erf.c index 5dd33f5f4..ba3a1690b 100644 --- a/erf.c +++ b/erf.c @@ -52,10 +52,11 @@ mpfr_erf (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) } else if (MPFR_IS_INF(x)) /* erf(+inf) = +1, erf(-inf) = -1 */ return mpfr_set_si (y, MPFR_FROM_SIGN_TO_INT(sign_x), GMP_RNDN); - else if (MPFR_IS_ZERO(x)) /* erf(+0) = +0, erf(-0) = -0 */ - return mpfr_set (y, x, GMP_RNDN); /* should keep the sign of x */ - else - MPFR_ASSERTN(0); + else /* erf(+0) = +0, erf(-0) = -0 */ + { + MPFR_ASSERTD(MPFR_IS_ZERO(x)); + return mpfr_set (y, x, GMP_RNDN); /* should keep the sign of x */ + } } /* now x is neither NaN, Inf nor 0 */ @@ -193,12 +194,6 @@ mpfr_erf_0 (mpfr_ptr res, mpfr_srcptr x, mp_rnd_t rnd_mode) ok = mpfr_can_round (s, m - log2tauk, GMP_RNDN, GMP_RNDZ, n + (rnd_mode == GMP_RNDN)); - - if (ok == 0) - { - if (m < n + log2tauk) - m = n + log2tauk; - } } while (ok == 0); -- cgit v1.2.1