diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-03 16:51:07 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-03 16:51:07 +0000 |
commit | f5f7883fc7cf47d38ed493a882fd7109bdd589bb (patch) | |
tree | 1058cf0d07593fa2cec9f32b4988ac40611b4bff /mpfr.h | |
parent | cbd40e1cb659b579e608afbe7a05da5b15a860be (diff) | |
download | mpfr-f5f7883fc7cf47d38ed493a882fd7109bdd589bb.tar.gz |
GMP_RNDX -> MPFR_RNDX
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6053 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.h')
-rw-r--r-- | mpfr.h | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -59,23 +59,29 @@ MPFR_VERSION_NUM(MPFR_VERSION_MAJOR,MPFR_VERSION_MINOR,MPFR_VERSION_PATCHLEVEL) (the integer type compatible with the enumerated type can even change, see ISO C99, 6.7.2.2#4), and in Makefile.am, AGE should be set to 0. - GMP_RNDU must appear just before GMP_RNDD (see + MPFR_RNDU must appear just before MPFR_RNDD (see MPFR_IS_RNDUTEST_OR_RNDDNOTTEST in mpfr-impl.h). If you change the order of the rounding modes, please update the routines in texceptions.c which assume 0=RNDN, 1=RNDZ, 2=RNDU, 3=RNDD, 4=RNDA. */ typedef enum { - GMP_RNDN=0, /* round to nearest, with ties to even */ - GMP_RNDZ, /* round toward zero */ - GMP_RNDU, /* round toward +Inf */ - GMP_RNDD, /* round toward -Inf */ - GMP_RNDA, /* round away from zero */ - GMP_RND_MAX, /* gives number of supported rounding modes, those after are + MPFR_RNDN=0, /* round to nearest, with ties to even */ + MPFR_RNDZ, /* round toward zero */ + MPFR_RNDU, /* round toward +Inf */ + MPFR_RNDD, /* round toward -Inf */ + MPFR_RNDA, /* round away from zero */ + MPFR_RND_MAX, /* gives number of supported rounding modes, those after are only supported by some functions */ - GMP_RNDNA=-1 /* round to nearest, with ties away from zero (mpfr_round) */ + MPFR_RNDNA=-1 /* round to nearest, with ties away from zero (mpfr_round) */ } mpfr_rnd_t; +/* kept for compatibility with MPFR 2.4.x and before */ +#define GMP_RNDN MPFR_RNDN +#define GMP_RNDZ MPFR_RNDZ +#define GMP_RNDU MPFR_RNDU +#define GMP_RNDD MPFR_RNDD + /* Define precision : 1 (short), 2 (int) or 3 (long) (DON'T USE IT!)*/ #ifndef _MPFR_PREC_FORMAT # if __GMP_MP_SIZE_T_INT == 1 @@ -716,10 +722,10 @@ __MPFR_DECLSPEC int mpfr_custom_get_kind _MPFR_PROTO ((mpfr_srcptr)); #define mpfr_get_prec(_x) ((_x)->_mpfr_prec + 0) #define mpfr_get_exp(_x) ((_x)->_mpfr_exp + 0) -#define mpfr_round(a,b) mpfr_rint((a), (b), GMP_RNDNA) -#define mpfr_trunc(a,b) mpfr_rint((a), (b), GMP_RNDZ) -#define mpfr_ceil(a,b) mpfr_rint((a), (b), GMP_RNDU) -#define mpfr_floor(a,b) mpfr_rint((a), (b), GMP_RNDD) +#define mpfr_round(a,b) mpfr_rint((a), (b), MPFR_RNDNA) +#define mpfr_trunc(a,b) mpfr_rint((a), (b), MPFR_RNDZ) +#define mpfr_ceil(a,b) mpfr_rint((a), (b), MPFR_RNDU) +#define mpfr_floor(a,b) mpfr_rint((a), (b), MPFR_RNDD) #define mpfr_cmp_ui(b,i) mpfr_cmp_ui_2exp((b),(i),0) #define mpfr_cmp_si(b,i) mpfr_cmp_si_2exp((b),(i),0) |