diff options
Diffstat (limited to 'patches/mpfr/3.1.3/160-jn.patch')
-rw-r--r-- | patches/mpfr/3.1.3/160-jn.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/patches/mpfr/3.1.3/160-jn.patch b/patches/mpfr/3.1.3/160-jn.patch new file mode 100644 index 00000000..e7d04fa1 --- /dev/null +++ b/patches/mpfr/3.1.3/160-jn.patch @@ -0,0 +1,71 @@ +diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES +--- mpfr-3.1.3-a/PATCHES 2016-02-15 15:10:03.358066124 +0000 ++++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:10:03.414066216 +0000 +@@ -0,0 +1 @@ ++jn +diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION +--- mpfr-3.1.3-a/VERSION 2015-10-29 13:47:46.763900609 +0000 ++++ mpfr-3.1.3-b/VERSION 2016-02-15 15:10:03.414066216 +0000 +@@ -1 +1 @@ +-3.1.3-p5 ++3.1.3-p6 +diff -Naurd mpfr-3.1.3-a/src/jyn_asympt.c mpfr-3.1.3-b/src/jyn_asympt.c +--- mpfr-3.1.3-a/src/jyn_asympt.c 2015-06-19 19:55:09.000000000 +0000 ++++ mpfr-3.1.3-b/src/jyn_asympt.c 2016-02-15 15:10:03.394066183 +0000 +@@ -253,9 +253,9 @@ + break; + if (diverge != 0) + { +- mpfr_set (c, z, r); /* will force inex=0 below, which means the +- asymptotic expansion failed */ +- break; ++ MPFR_ZIV_FREE (loop); ++ mpfr_clear (c); ++ return 0; /* means that the asymptotic expansion failed */ + } + MPFR_ZIV_NEXT (loop, w); + } +diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h +--- mpfr-3.1.3-a/src/mpfr.h 2015-10-29 13:47:46.759900692 +0000 ++++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:10:03.410066210 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 3 +-#define MPFR_VERSION_STRING "3.1.3-p5" ++#define MPFR_VERSION_STRING "3.1.3-p6" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c +--- mpfr-3.1.3-a/src/version.c 2015-10-29 13:47:46.763900609 +0000 ++++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:10:03.414066216 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.3-p5"; ++ return "3.1.3-p6"; + } +diff -Naurd mpfr-3.1.3-a/tests/tj0.c mpfr-3.1.3-b/tests/tj0.c +--- mpfr-3.1.3-a/tests/tj0.c 2015-06-19 19:55:10.000000000 +0000 ++++ mpfr-3.1.3-b/tests/tj0.c 2016-02-15 15:10:03.394066183 +0000 +@@ -99,6 +99,18 @@ + mpfr_j0 (y, x, MPFR_RNDN); + MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_ui_2exp (y, 41, -11) == 0); + ++ /* Bug reported by Fredrik Johansson on 19 Jan 2016 */ ++ mpfr_set_prec (x, 53); ++ mpfr_set_str (x, "0x4.3328p+0", 0, MPFR_RNDN); ++ mpfr_set_prec (y, 2); ++ mpfr_j0 (y, x, MPFR_RNDD); ++ /* y should be -0.5 */ ++ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -1, -1) == 0); ++ mpfr_set_prec (y, 3); ++ mpfr_j0 (y, x, MPFR_RNDD); ++ /* y should be -0.4375 */ ++ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -7, -4) == 0); ++ + /* Case for which s = 0 in mpfr_jn */ + mpfr_set_prec (x, 44); + mpfr_set_prec (y, 44); |