diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2012-07-05 08:35:35 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2012-07-05 08:35:35 +0000 |
commit | 4646f388cb3aa3d3435a08c7bdacab16e9530137 (patch) | |
tree | 7a763f548d2628e587c735171427522939641f3d /src | |
parent | 0a5f9840d4778b15543716787ef81be1cf627bca (diff) | |
download | mpc-4646f388cb3aa3d3435a08c7bdacab16e9530137.tar.gz |
rename RNDC to MPC_RND in mpc.h
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1223 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src')
-rw-r--r-- | src/acos.c | 4 | ||||
-rw-r--r-- | src/acosh.c | 6 | ||||
-rw-r--r-- | src/asinh.c | 4 | ||||
-rw-r--r-- | src/atanh.c | 4 | ||||
-rw-r--r-- | src/log10.c | 4 | ||||
-rw-r--r-- | src/mpc.h | 40 | ||||
-rw-r--r-- | src/sinh.c | 4 | ||||
-rw-r--r-- | src/tanh.c | 4 |
8 files changed, 35 insertions, 35 deletions
@@ -1,6 +1,6 @@ /* mpc_acos -- arccosine of a complex number. -Copyright (C) 2009, 2010, 2011 INRIA +Copyright (C) 2009, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -186,7 +186,7 @@ mpc_acos (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) rnd_im = rnd_im == GMP_RNDU ? GMP_RNDD : rnd_im == GMP_RNDD ? GMP_RNDU : rnd_im; /* both RNDZ and RNDA map to themselves for -asin(z) */ - rnd1 = RNDC(GMP_RNDN, rnd_im); + rnd1 = MPC_RND (GMP_RNDN, rnd_im); mpfr_init2 (pi_over_2, p); for (;;) { diff --git a/src/acosh.c b/src/acosh.c index a4eef4c..782f555 100644 --- a/src/acosh.c +++ b/src/acosh.c @@ -1,6 +1,6 @@ /* mpc_acosh -- inverse hyperbolic cosine of a complex number. -Copyright (C) 2009, 2011 INRIA +Copyright (C) 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -46,7 +46,7 @@ mpc_acosh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) if (mpfr_signbit (mpc_imagref (op))) { inex = mpc_acos (a, op, - RNDC (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); + MPC_RND (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); /* change a to -i*a, i.e., -y+i*x to x+i*y */ tmp[0] = mpc_realref (a)[0]; @@ -58,7 +58,7 @@ mpc_acosh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) else { inex = mpc_acos (a, op, - RNDC (MPC_RND_IM (rnd), INV_RND(MPC_RND_RE (rnd)))); + MPC_RND (MPC_RND_IM (rnd), INV_RND(MPC_RND_RE (rnd)))); /* change a to i*a, i.e., y-i*x to x+i*y */ tmp[0] = mpc_realref (a)[0]; diff --git a/src/asinh.c b/src/asinh.c index 89477a6..2807a8b 100644 --- a/src/asinh.c +++ b/src/asinh.c @@ -1,6 +1,6 @@ /* mpc_asinh -- inverse hyperbolic sine of a complex number. -Copyright (C) 2009, 2011 INRIA +Copyright (C) 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -37,7 +37,7 @@ mpc_asinh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) mpc_init3 (a, MPC_PREC_IM(rop), MPC_PREC_RE(rop)); inex = mpc_asin (a, z, - RNDC (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); + MPC_RND (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); /* if a = asin(i*op) = x+i*y, and we want y-i*x */ diff --git a/src/atanh.c b/src/atanh.c index 3e1c448..e5716cc 100644 --- a/src/atanh.c +++ b/src/atanh.c @@ -1,6 +1,6 @@ /* mpc_atanh -- inverse hyperbolic tangent of a complex number. -Copyright (C) 2009, 2011 INRIA +Copyright (C) 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -36,7 +36,7 @@ mpc_atanh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) mpc_init3 (a, MPC_PREC_IM(rop), MPC_PREC_RE(rop)); inex = mpc_atan (a, z, - RNDC (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); + MPC_RND (INV_RND (MPC_RND_IM (rnd)), MPC_RND_RE (rnd))); /* change a to -i*a, i.e., x+i*y to y-i*x */ tmp[0] = mpc_realref (a)[0]; diff --git a/src/log10.c b/src/log10.c index 10a2566..a6fc86c 100644 --- a/src/log10.c +++ b/src/log10.c @@ -184,7 +184,7 @@ mpc_log10 (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) inex_re = mpfr_set_ui (mpc_realref (rop), 0, MPC_RND_RE (rnd)); else inex_re = mpc_log10_aux (rop, ww, rnd, 0, 1); - inex_im = mpc_log10_aux (rop, op, RNDC(0,rnd_im), 1, 2); + inex_im = mpc_log10_aux (rop, op, MPC_RND (0,rnd_im), 1, 2); if (negative_zero) { mpc_conj (rop, rop, MPC_RNDNN); @@ -208,7 +208,7 @@ mpc_log10 (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) ww->im[0] = *mpc_imagref (op); MPFR_CHANGE_SIGN (ww->im); inex_re = mpc_log10_aux (rop, ww, rnd, 0, 3); - invrnd = RNDC(0, INV_RND (MPC_RND_IM (rnd))); + invrnd = MPC_RND (0, INV_RND (MPC_RND_IM (rnd))); inex_im = mpc_log10_aux (rop, op, invrnd, 1, 2); /* division by 2 does not change the ternary flag */ mpfr_div_2ui (mpc_imagref (rop), mpc_imagref (rop), 1, GMP_RNDN); @@ -74,29 +74,29 @@ along with this program. If not, see http://www.gnu.org/licenses/ . we reserve four bits for a real rounding mode. */ typedef int mpc_rnd_t; -#define RNDC(r1,r2) (((int)(r1)) + ((int)(r2) << 4)) +#define MPC_RND(r1,r2) (((int)(r1)) + ((int)(r2) << 4)) #define MPC_RND_RE(x) ((mpfr_rnd_t)((x) & 0x0F)) #define MPC_RND_IM(x) ((mpfr_rnd_t)((x) >> 4)) -#define MPC_RNDNN RNDC(GMP_RNDN,GMP_RNDN) -#define MPC_RNDNZ RNDC(GMP_RNDN,GMP_RNDZ) -#define MPC_RNDNU RNDC(GMP_RNDN,GMP_RNDU) -#define MPC_RNDND RNDC(GMP_RNDN,GMP_RNDD) - -#define MPC_RNDZN RNDC(GMP_RNDZ,GMP_RNDN) -#define MPC_RNDZZ RNDC(GMP_RNDZ,GMP_RNDZ) -#define MPC_RNDZU RNDC(GMP_RNDZ,GMP_RNDU) -#define MPC_RNDZD RNDC(GMP_RNDZ,GMP_RNDD) - -#define MPC_RNDUN RNDC(GMP_RNDU,GMP_RNDN) -#define MPC_RNDUZ RNDC(GMP_RNDU,GMP_RNDZ) -#define MPC_RNDUU RNDC(GMP_RNDU,GMP_RNDU) -#define MPC_RNDUD RNDC(GMP_RNDU,GMP_RNDD) - -#define MPC_RNDDN RNDC(GMP_RNDD,GMP_RNDN) -#define MPC_RNDDZ RNDC(GMP_RNDD,GMP_RNDZ) -#define MPC_RNDDU RNDC(GMP_RNDD,GMP_RNDU) -#define MPC_RNDDD RNDC(GMP_RNDD,GMP_RNDD) +#define MPC_RNDNN MPC_RND (GMP_RNDN,GMP_RNDN) +#define MPC_RNDNZ MPC_RND (GMP_RNDN,GMP_RNDZ) +#define MPC_RNDNU MPC_RND (GMP_RNDN,GMP_RNDU) +#define MPC_RNDND MPC_RND (GMP_RNDN,GMP_RNDD) + +#define MPC_RNDZN MPC_RND (GMP_RNDZ,GMP_RNDN) +#define MPC_RNDZZ MPC_RND (GMP_RNDZ,GMP_RNDZ) +#define MPC_RNDZU MPC_RND (GMP_RNDZ,GMP_RNDU) +#define MPC_RNDZD MPC_RND (GMP_RNDZ,GMP_RNDD) + +#define MPC_RNDUN MPC_RND (GMP_RNDU,GMP_RNDN) +#define MPC_RNDUZ MPC_RND (GMP_RNDU,GMP_RNDZ) +#define MPC_RNDUU MPC_RND (GMP_RNDU,GMP_RNDU) +#define MPC_RNDUD MPC_RND (GMP_RNDU,GMP_RNDD) + +#define MPC_RNDDN MPC_RND (GMP_RNDD,GMP_RNDN) +#define MPC_RNDDZ MPC_RND (GMP_RNDD,GMP_RNDZ) +#define MPC_RNDDU MPC_RND (GMP_RNDD,GMP_RNDU) +#define MPC_RNDDD MPC_RND (GMP_RNDD,GMP_RNDD) /* Definitions of types and their semantics */ @@ -1,6 +1,6 @@ /* mpc_sinh -- hyperbolic sine of a complex number. -Copyright (C)2008, 2009, 2011 INRIA +Copyright (C)2008, 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -36,7 +36,7 @@ mpc_sinh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) mpc_realref (sin_z)[0] = mpc_imagref (rop)[0]; mpc_imagref (sin_z)[0] = mpc_realref (rop)[0]; - inex = mpc_sin (sin_z, z, RNDC (MPC_RND_IM (rnd), MPC_RND_RE (rnd))); + inex = mpc_sin (sin_z, z, MPC_RND (MPC_RND_IM (rnd), MPC_RND_RE (rnd))); /* sin_z and rop parts share the same significands, copy the rest now. */ mpc_realref (rop)[0] = mpc_imagref (sin_z)[0]; @@ -1,6 +1,6 @@ /* mpc_tanh -- hyperbolic tangent of a complex number. -Copyright (C) 2008, 2009, 2011 INRIA +Copyright (C) 2008, 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -36,7 +36,7 @@ mpc_tanh (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) mpc_realref (tan_z)[0] = mpc_imagref (rop)[0]; mpc_imagref (tan_z)[0] = mpc_realref (rop)[0]; - inex = mpc_tan (tan_z, z, RNDC (MPC_RND_IM (rnd), MPC_RND_RE (rnd))); + inex = mpc_tan (tan_z, z, MPC_RND (MPC_RND_IM (rnd), MPC_RND_RE (rnd))); /* tan_z and rop parts share the same significands, copy the rest now. */ mpc_realref (rop)[0] = mpc_imagref (tan_z)[0]; |