summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-06-30 13:24:02 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-06-30 13:24:02 +0000
commit0074f3be3db21027453a666e15a6862e41f4e59f (patch)
tree789b38e08ab3bcc538fcabdb778028d4559b6920
parent280dbfc1a2b34b7fefeba9f3801e51187f1ef0ad (diff)
downloadmpc-0074f3be3db21027453a666e15a6862e41f4e59f.tar.gz
log.c : no need to single out the case of log(1+epsilon) in the first algorithm
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1210 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--src/log.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/log.c b/src/log.c
index d9f19fd..8c13164 100644
--- a/src/log.c
+++ b/src/log.c
@@ -29,7 +29,7 @@ mpc_log (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd){
mpfr_prec_t prec;
int loops;
int re_cmp, im_cmp;
- int inex_re, inex_im, inex;
+ int inex_re, inex_im;
int err;
mpfr_exp_t expw;
@@ -142,15 +142,11 @@ do { \
mpfr_set_prec (w, prec);
/* w is rounded down */
- inex = mpc_norm (w, op, GMP_RNDN);
+ mpc_norm (w, op, GMP_RNDN);
/* error 0.5 ulp */
if (mpfr_inf_p (w) || mpfr_zero_p (w))
/* intermediate over- or underflow; the logarithm may be representable */
break;
- if (inex && mpfr_cmp_ui (w, 1) == 0)
- /* this is like an underflow; the following call to log will
- compute 0 instead of a positive result */
- break;
mpfr_log (w, w, GMP_RNDN);
/* generic error of log: (2^(- exp(w)) + 0.5) ulp */