diff options
Diffstat (limited to 'src/mul_fr.c')
-rw-r--r-- | src/mul_fr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mul_fr.c b/src/mul_fr.c index 4b049b6..bd3574d 100644 --- a/src/mul_fr.c +++ b/src/mul_fr.c @@ -1,6 +1,6 @@ /* mpc_mul_fr -- Multiply a complex number by a floating-point number. -Copyright (C) 2002, 2008, 2009, 2010 INRIA +Copyright (C) 2002, 2008, 2009, 2010, 2011 INRIA This file is part of GNU MPC. @@ -26,17 +26,17 @@ mpc_mul_fr (mpc_ptr a, mpc_srcptr b, mpfr_srcptr c, mpc_rnd_t rnd) int inex_re, inex_im; mpfr_t real; - if (c == MPC_RE (a)) + if (c == mpc_realref (a)) /* We have to use a temporary variable. */ mpfr_init2 (real, MPC_PREC_RE (a)); else - real [0] = MPC_RE (a) [0]; + real [0] = mpc_realref (a) [0]; - inex_re = mpfr_mul (real, MPC_RE(b), c, MPC_RND_RE(rnd)); - inex_im = mpfr_mul (MPC_IM(a), MPC_IM(b), c, MPC_RND_IM(rnd)); - mpfr_set (MPC_RE (a), real, GMP_RNDN); /* exact */ + inex_re = mpfr_mul (real, mpc_realref(b), c, MPC_RND_RE(rnd)); + inex_im = mpfr_mul (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd)); + mpfr_set (mpc_realref (a), real, GMP_RNDN); /* exact */ - if (c == MPC_RE (a)) + if (c == mpc_realref (a)) mpfr_clear (real); return MPC_INEX(inex_re, inex_im); |