summaryrefslogtreecommitdiff
path: root/erf.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2004-02-12 12:54:48 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2004-02-12 12:54:48 +0000
commit5d8fcc6938422553d0f4661ec601cac408062590 (patch)
tree472a926e4b8b169ae029d460b46bd070d4290d5d /erf.c
parent75b314a7573ede83dce44a5da59c12e6dfdfeb0c (diff)
downloadmpfr-5d8fcc6938422553d0f4661ec601cac408062590.tar.gz
improved coverage test
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2684 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'erf.c')
-rw-r--r--erf.c15
1 files changed, 5 insertions, 10 deletions
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);