From: Paul Zimmermann Date: Wed, 4 Oct 2017 20:09:40 +0000 (+0200) Subject: replace obsolete mpfr_add_one_ulp/mpfr_sub_one_ulp functions X-Git-Url: https://scm.gforge.inria.fr/anonscm/gitweb?p=mpc%2Fmpc.git;a=commitdiff_plain;h=5eaa17651b759c7856a118835802fecbebcf46ad replace obsolete mpfr_add_one_ulp/mpfr_sub_one_ulp functions --- Index: mpc-1.0.3/src/mpc-impl.h =================================================================== --- mpc-1.0.3.orig/src/mpc-impl.h 2018-01-02 14:04:02.075989843 +0100 +++ mpc-1.0.3/src/mpc-impl.h 2018-01-02 14:05:02.712974966 +0100 @@ -60,8 +60,10 @@ along with this program. If not, see htt mpfr_setsign (x, y, 0, rnd) : \ mpfr_copysign (x, y, z, rnd)) /* work around spurious signs in nan */ -#define MPFR_ADD_ONE_ULP(x) mpfr_add_one_ulp (x, GMP_RNDN) -#define MPFR_SUB_ONE_ULP(x) mpfr_sub_one_ulp (x, GMP_RNDN) +#define MPFR_ADD_ONE_ULP(x) \ + (mpfr_sgn (x) > 0 ? mpfr_nextabove (x) : mpfr_nextbelow (x)) +#define MPFR_SUB_ONE_ULP(x) \ + (mpfr_sgn (x) > 0 ? mpfr_nextbelow (x) : mpfr_nextabove (x)) /* drop unused rounding mode from macroes */ #define MPFR_SWAP(a,b) do { mpfr_srcptr tmp; tmp = a; a = b; b = tmp; } while (0)