summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-10-01 11:20:11 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-10-01 11:20:11 +0000
commit25728a7a94d5cb941fe576cc606e1732907b8935 (patch)
tree95d8f3a1afe0988497496760d8103299fa7c7aa4
parentdce9cb91608585c3ff3f3f34f0e608028d93b8ae (diff)
downloadmpc-25728a7a94d5cb941fe576cc606e1732907b8935.tar.gz
log10.c, log10.dat: reverted previous bug fix to propose a different patch
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1275 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--src/log10.c4
-rw-r--r--tests/log10.dat3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/log10.c b/src/log10.c
index f2062d3..6b7e687 100644
--- a/src/log10.c
+++ b/src/log10.c
@@ -82,9 +82,7 @@ mpc_log10_aux (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd, int flag, int nb)
mpfr_div (mpc_realref (tmp), mpc_realref (tmp), log10, MPFR_RNDN);
ok = mpfr_can_round (mpc_realref (tmp), prec - 2, MPFR_RNDN,
MPFR_RNDZ, MPC_PREC_RE(rop) +
- (MPC_RND_RE (rnd) == MPFR_RNDN)) ||
- mpfr_cmp_ui (mpc_imagref (op), 1) == 0;
- /* the result is also exact when y=1 */
+ (MPC_RND_RE (rnd) == MPFR_RNDN));
if (ok)
ret = mpfr_set (mpc_realref (rop), mpc_realref (tmp),
MPC_RND_RE (rnd));
diff --git a/tests/log10.dat b/tests/log10.dat
index 573f8fc..fe49e28 100644
--- a/tests/log10.dat
+++ b/tests/log10.dat
@@ -173,6 +173,3 @@
# log10(3+I) has an exact real part (from Joseph S. Myers)
0 + 53 0.5 53 0x8f168ee8415e7p-54 2 3 2 1 N N
-
-# bug found by Mickael Gastineau on 29 Sep 2012
-0 + 2 +0 2 0.75 2 +0 2 1 N N