summaryrefslogtreecommitdiff
path: root/src/div.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-08-26 14:05:52 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-08-26 14:05:52 +0000
commit3d2751007b7d74172b513b8d650e4ed743a0ea2f (patch)
tree16fe1a37de52add79b7f8bf5a592c59e909fc494 /src/div.c
parent2c4dee58cc90c46f48d6363ffb3f79ccf870f6bd (diff)
downloadmpc-3d2751007b7d74172b513b8d650e4ed743a0ea2f.tar.gz
[div.c] revert to r661
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@665 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/div.c')
-rw-r--r--src/div.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/div.c b/src/div.c
index b3e6ad3..bea659f 100644
--- a/src/div.c
+++ b/src/div.c
@@ -221,8 +221,11 @@ mpc_div (mpc_ptr a, mpc_srcptr b, mpc_srcptr c, mpc_rnd_t rnd)
if (overlap)
{
- mpfr_swap (MPC_RE(a), MPC_RE(tmpa));
- mpfr_swap (MPC_IM(a), MPC_IM(tmpa));
+ /* Note: we could use mpc_swap here, but this might cause problems
+ if a and tmpa have been allocated using different methods, since
+ it will swap the significands of a and tmpa. See http://
+ lists.gforge.inria.fr/pipermail/mpc-discuss/2009-August/000504.html */
+ mpc_set (a, tmpa, MPC_RNDNN); /* exact */
mpc_clear (tmpa);
}