summaryrefslogtreecommitdiff
path: root/src/mul.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-03-06 20:51:08 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-03-06 20:51:08 +0000
commitb7c13d52eee1c7946010f0a6aba28d22bc504008 (patch)
treee5c533239d3d0253c656ce43e0cc37c9a1011eac /src/mul.c
parentb1af57b47281797329f7d3298585a60750e287f9 (diff)
downloadmpc-b7c13d52eee1c7946010f0a6aba28d22bc504008.tar.gz
[mul.c] don't call mpc_sqr any more when both inputs are the same variable
[mpc.texi,NEWS] document the above change git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1139 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/mul.c')
-rw-r--r--src/mul.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mul.c b/src/mul.c
index ead0087..2be9b8d 100644
--- a/src/mul.c
+++ b/src/mul.c
@@ -623,12 +623,6 @@ mpc_mul (mpc_ptr a, mpc_srcptr b, mpc_srcptr c, mpc_rnd_t rnd)
if (mpfr_zero_p (mpc_realref (c)))
return mul_imag (a, b, c, rnd);
- /* Check if b==c and call mpc_sqr in this case, to make sure */
- /* mpc_mul(a,b,b) behaves exactly like mpc_sqr(a,b) concerning */
- /* internal overflows etc. */
- if (mpc_cmp (b, c) == 0)
- return mpc_sqr (a, b, rnd);
-
/* If the real and imaginary part of one argument have a very different */
/* exponent, it is not reasonable to use Karatsuba multiplication. */
if ( SAFE_ABS (mpfr_exp_t,