diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES --- mpfr-3.1.2-a/PATCHES 2014-04-15 22:04:57.090286262 +0000 +++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:04:57.162288198 +0000 @@ -0,0 +1 @@ +exp3 diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION --- mpfr-3.1.2-a/VERSION 2014-04-15 22:04:57.086286154 +0000 +++ mpfr-3.1.2-b/VERSION 2014-04-15 22:04:57.162288198 +0000 @@ -1 +1 @@ -3.1.2-p6 +3.1.2-p7 diff -Naurd mpfr-3.1.2-a/src/exp3.c mpfr-3.1.2-b/src/exp3.c --- mpfr-3.1.2-a/src/exp3.c 2013-03-13 15:37:34.000000000 +0000 +++ mpfr-3.1.2-b/src/exp3.c 2014-04-15 22:04:57.126287230 +0000 @@ -283,7 +283,7 @@ } } - if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDD, MPFR_RNDZ, + if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDN, MPFR_RNDZ, MPFR_PREC(y) + (rnd_mode == MPFR_RNDN))) { inexact = mpfr_set (y, shift_x > 0 ? t : tmp, rnd_mode); diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h --- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:04:57.086286154 +0000 +++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:04:57.162288198 +0000 @@ -27,7 +27,7 @@ #define MPFR_VERSION_MAJOR 3 #define MPFR_VERSION_MINOR 1 #define MPFR_VERSION_PATCHLEVEL 2 -#define MPFR_VERSION_STRING "3.1.2-p6" +#define MPFR_VERSION_STRING "3.1.2-p7" /* Macros dealing with MPFR VERSION */ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c --- mpfr-3.1.2-a/src/version.c 2014-04-15 22:04:57.090286262 +0000 +++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:04:57.162288198 +0000 @@ -25,5 +25,5 @@ const char * mpfr_get_version (void) { - return "3.1.2-p6"; + return "3.1.2-p7"; } diff -Naurd mpfr-3.1.2-a/tests/texp.c mpfr-3.1.2-b/tests/texp.c --- mpfr-3.1.2-a/tests/texp.c 2013-03-13 15:37:44.000000000 +0000 +++ mpfr-3.1.2-b/tests/texp.c 2014-04-15 22:04:57.126287230 +0000 @@ -150,6 +150,22 @@ exit (1); } + mpfr_set_prec (x, 118); + mpfr_set_str_binary (x, "0.1110010100011101010000111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E-86"); + mpfr_set_prec (y, 118); + mpfr_exp_2 (y, x, MPFR_RNDU); + mpfr_exp_3 (x, x, MPFR_RNDU); + if (mpfr_cmp (x, y)) + { + printf ("mpfr_exp_2 and mpfr_exp_3 differ for prec=118\n"); + printf ("mpfr_exp_2 gives "); + mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); + printf ("\nmpfr_exp_3 gives "); + mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); + printf ("\n"); + exit (1); + } + mpfr_clear (x); mpfr_clear (y); return 0;