Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/mpfr/files/3.1.3/, dev-libs/mpfr/files/2.4.2/, ...
Date: Fri, 08 Dec 2017 18:47:56
Message-Id: 1512758831.75172ab698a4c71e7ecc6c91fde756fccd05d8ab.mgorny@gentoo
1 commit: 75172ab698a4c71e7ecc6c91fde756fccd05d8ab
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 8 18:32:38 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 8 18:47:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75172ab6
7
8 dev-libs/mpfr: [QA] Move patches to distfile
9
10 Closes: https://bugs.gentoo.org/620558
11
12 dev-libs/mpfr/Manifest | 3 +
13 dev-libs/mpfr/files/2.4.2/patch01 | 184 ------
14 dev-libs/mpfr/files/2.4.2/patch02 | 71 ---
15 dev-libs/mpfr/files/2.4.2/patch03 | 75 ---
16 dev-libs/mpfr/files/3.1.3/patch01 | 1117 ---------------------------------
17 dev-libs/mpfr/files/3.1.3/patch02 | 161 -----
18 dev-libs/mpfr/files/3.1.3/patch03 | 217 -------
19 dev-libs/mpfr/files/3.1.3/patch04 | 204 ------
20 dev-libs/mpfr/files/3.1.5/patch01 | 82 ---
21 dev-libs/mpfr/files/3.1.5/patch02 | 92 ---
22 dev-libs/mpfr/mpfr-2.4.2_p3-r1.ebuild | 5 +-
23 dev-libs/mpfr/mpfr-3.1.3_p4.ebuild | 5 +-
24 dev-libs/mpfr/mpfr-3.1.5_p2.ebuild | 5 +-
25 13 files changed, 12 insertions(+), 2209 deletions(-)
26
27 diff --git a/dev-libs/mpfr/Manifest b/dev-libs/mpfr/Manifest
28 index 19a99395090..376ccfbb2bf 100644
29 --- a/dev-libs/mpfr/Manifest
30 +++ b/dev-libs/mpfr/Manifest
31 @@ -1,5 +1,8 @@
32 +DIST mpfr-2.4.2-patchset.tar.bz2 2965 BLAKE2B 2748f8ebea766265ea1b31de1c0494e89e8868440675e4f8b03a771b220f3007ffa1bfdeb84112560d95107d4075ed6e37d54aa71546c8bc7e518ff32a1adce6 SHA512 d28749096ff1d8ab026eba076d7874fd0687dd5199dcadb60ab9a5adcfbe4c1a4583c83e5d4868e16e2218247f129623128af89d41e1c348c64c1e91bcb5e653
33 DIST mpfr-2.4.2.tar.bz2 1077886 BLAKE2B bdbd8fcd5b3f459383fff60adb75e3e419b65b20073a86fbad83677fa546f8f2364bce799f623964cafe94b1b8652a13b54cdae8d9316350c24061c396cafa8b SHA512 c004b3dbf86c04960e4a1f8db37a409a7cc4cb76135e76e98dcc5ad93aaa8deb62334ee13ff84447a7c12a5e8cb57f25c62ac908c24920f1fb1a38d79d4a4c5e
34 +DIST mpfr-3.1.3-patchset.tar.xz 12988 BLAKE2B b2ebf0f0d5b90f8f9618c71762ca3def64bad6c79e7b32ca0d9121d2ed4032b869b945359da79ba2eb2cca07789cc1ede1502bb998f5f1234b206825d2db6ebd SHA512 dd2de34aad0470920f75b8911701a2979205b3173b97c41d4b5cd9ff78a38633ca7d6993c2e5465b5e5f76066d46189a32437f5b79ac50c29f2a47970c0421ea
35 DIST mpfr-3.1.3.tar.xz 1112096 BLAKE2B cd7bc886e73ff43e323cde837bc90a41cf97238054e1ffe597455314f307ff7d8c95756b1414ee030a1f974c8041669b75dbf90581c9c5705e3f5c8a1878de46 SHA512 79846fd82974269aa48152c2b6dbcb2321130dc4d0f0ba2eb94d56619b177add9b2077ebf88b4382c56db19c4215910e5a252f216715c1eee40baa299da42eb4
36 DIST mpfr-3.1.4.tar.xz 1122152 BLAKE2B d8d686c3280c062a0941c37cb0a0bacfb25a03a6064489b56db331ffbd9369c453ded1357b2c5841fc72eee2ef36c4d7a8acc27418dcf5f045c7e4ea6615d682 SHA512 4ef61708834efdea6b85258f46f1b25ce1c55b912f44b117d8c3d5e06d8f1177e50f627d9736f3289bd159c5bb10c80e09d1ad9f6f52c4ff43c3496034b04232
37 +DIST mpfr-3.1.5-patchset.tar.xz 1840 BLAKE2B c18392ecc3325c0b889b540257f3bfe3c382a7f0d12a5dc87550e9ee884f87480bcfec7541e05c6c27bcfd7c5fa60d35f575f56ccea59912434b241f51e5d113 SHA512 24ae807db036345267623dd977387b154e905197aa826e82cfc8dcf324ade78f78aef9e86ca6e2cbc091e01a8da9ea6c52a91a5183375d5fab45e54912bd3fd8
38 DIST mpfr-3.1.5.tar.xz 1126668 BLAKE2B f902925036a4310e7b10461438bae5d5770b95ca6bd897038dc306d597ea412013c869b3d2f9c4ba2a1d5e59eee67f562fc3bf5db8fd1584b70c1b30574e42f5 SHA512 3643469b9099b31e41d6ec9158196cd1c30894030c8864ee5b1b1e91b488bccbf7c263c951b03fe9f4ae6f9d29279e157a7dfed0885467d875f107a3d964f032
39 DIST mpfr-3.1.6.tar.xz 1133672 BLAKE2B ab8b87be9d29e9ae5807976f72d65e16cd3e5b4c2ffc4e5bd7829e664250b1969a1ec3928b3519cd75365692e23eadfd413a8116f8c77d6cd66183020b72b656 SHA512 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054
40
41 diff --git a/dev-libs/mpfr/files/2.4.2/patch01 b/dev-libs/mpfr/files/2.4.2/patch01
42 deleted file mode 100644
43 index 2721517c428..00000000000
44 --- a/dev-libs/mpfr/files/2.4.2/patch01
45 +++ /dev/null
46 @@ -1,184 +0,0 @@
47 -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES
48 ---- mpfr-2.4.2-a/PATCHES 2009-12-07 13:37:12.000000000 +0000
49 -+++ mpfr-2.4.2-b/PATCHES 2009-12-07 13:37:12.000000000 +0000
50 -@@ -0,0 +1 @@
51 -+sin_cos_underflow
52 -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION
53 ---- mpfr-2.4.2-a/VERSION 2009-11-30 02:43:08.000000000 +0000
54 -+++ mpfr-2.4.2-b/VERSION 2009-12-07 13:37:12.000000000 +0000
55 -@@ -1 +1 @@
56 --2.4.2
57 -+2.4.2-p1
58 -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h
59 ---- mpfr-2.4.2-a/mpfr.h 2009-11-30 02:43:08.000000000 +0000
60 -+++ mpfr-2.4.2-b/mpfr.h 2009-12-07 13:37:12.000000000 +0000
61 -@@ -27,7 +27,7 @@
62 - #define MPFR_VERSION_MAJOR 2
63 - #define MPFR_VERSION_MINOR 4
64 - #define MPFR_VERSION_PATCHLEVEL 2
65 --#define MPFR_VERSION_STRING "2.4.2"
66 -+#define MPFR_VERSION_STRING "2.4.2-p1"
67 -
68 - /* Macros dealing with MPFR VERSION */
69 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
70 -diff -Naurd mpfr-2.4.2-a/sin_cos.c mpfr-2.4.2-b/sin_cos.c
71 ---- mpfr-2.4.2-a/sin_cos.c 2009-11-30 02:43:09.000000000 +0000
72 -+++ mpfr-2.4.2-b/sin_cos.c 2009-12-07 13:37:12.000000000 +0000
73 -@@ -82,17 +82,19 @@
74 - if (y != x)
75 - /* y and x differ, thus we can safely try to compute y first */
76 - {
77 -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0, rnd_mode,
78 -- { inexy = _inexact;
79 -- goto small_input; });
80 -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
81 -+ y, x, -2 * expx, 2, 0, rnd_mode,
82 -+ { inexy = _inexact;
83 -+ goto small_input; });
84 - if (0)
85 - {
86 - small_input:
87 - /* we can go here only if we can round sin(x) */
88 -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx,
89 -- 1, 0, rnd_mode,
90 -- { inexz = _inexact;
91 -- goto end; });
92 -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
93 -+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode,
94 -+ { inexz = _inexact;
95 -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
96 -+ goto end; });
97 - }
98 -
99 - /* if we go here, one of the two MPFR_FAST_COMPUTE_IF_SMALL_INPUT
100 -@@ -101,18 +103,19 @@
101 - else /* y and x are the same variable: try to compute z first, which
102 - necessarily differs */
103 - {
104 -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx,
105 -- 1, 0, rnd_mode,
106 -- { inexz = _inexact;
107 -- goto small_input2; });
108 -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
109 -+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode,
110 -+ { inexz = _inexact;
111 -+ goto small_input2; });
112 - if (0)
113 - {
114 - small_input2:
115 - /* we can go here only if we can round cos(x) */
116 -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0,
117 -- rnd_mode,
118 -- { inexy = _inexact;
119 -- goto end; });
120 -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
121 -+ y, x, -2 * expx, 2, 0, rnd_mode,
122 -+ { inexy = _inexact;
123 -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
124 -+ goto end; });
125 - }
126 - }
127 - m += 2 * (-expx);
128 -@@ -207,7 +210,6 @@
129 - mpfr_clear (xr);
130 -
131 - end:
132 -- /* FIXME: update the underflow flag if need be. */
133 - MPFR_SAVE_EXPO_FREE (expo);
134 - mpfr_check_range (y, inexy, rnd_mode);
135 - mpfr_check_range (z, inexz, rnd_mode);
136 -diff -Naurd mpfr-2.4.2-a/tests/tsin_cos.c mpfr-2.4.2-b/tests/tsin_cos.c
137 ---- mpfr-2.4.2-a/tests/tsin_cos.c 2009-11-30 02:43:08.000000000 +0000
138 -+++ mpfr-2.4.2-b/tests/tsin_cos.c 2009-12-07 13:37:12.000000000 +0000
139 -@@ -382,23 +382,56 @@
140 - consistency (void)
141 - {
142 - mpfr_t x, s1, s2, c1, c2;
143 -+ mp_exp_t emin, emax;
144 - mp_rnd_t rnd;
145 -+ unsigned int flags_sin, flags_cos, flags, flags_before, flags_ref;
146 -+ int inex_sin, inex_cos, inex, inex_ref;
147 - int i;
148 -
149 -+ emin = mpfr_get_emin ();
150 -+ emax = mpfr_get_emax ();
151 -+
152 - for (i = 0; i <= 10000; i++)
153 - {
154 - mpfr_init2 (x, MPFR_PREC_MIN + (randlimb () % 8));
155 - mpfr_inits2 (MPFR_PREC_MIN + (randlimb () % 8), s1, s2, c1, c2,
156 - (mpfr_ptr) 0);
157 -- tests_default_random (x, 256, -5, 50);
158 -- rnd = RND_RAND ();
159 -- mpfr_sin (s1, x, rnd);
160 -- mpfr_cos (c1, x, rnd);
161 -- mpfr_sin_cos (s2, c2, x, rnd);
162 -- if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2)))
163 -+ if (i < 8 * GMP_RND_MAX)
164 - {
165 -- printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s,\nx = ",
166 -- mpfr_print_rnd_mode (rnd));
167 -+ int j = i / GMP_RND_MAX;
168 -+ if (j & 1)
169 -+ mpfr_set_emin (MPFR_EMIN_MIN);
170 -+ mpfr_set_si (x, (j & 2) ? 1 : -1, GMP_RNDN);
171 -+ mpfr_set_exp (x, mpfr_get_emin ());
172 -+ rnd = (mpfr_rnd_t) (i % GMP_RND_MAX);
173 -+ flags_before = 0;
174 -+ if (j & 4)
175 -+ mpfr_set_emax (-17);
176 -+ }
177 -+ else
178 -+ {
179 -+ tests_default_random (x, 256, -5, 50);
180 -+ rnd = RND_RAND ();
181 -+ flags_before = (randlimb () & 1) ?
182 -+ (unsigned int) (MPFR_FLAGS_ALL ^ MPFR_FLAGS_ERANGE) :
183 -+ (unsigned int) 0;
184 -+ }
185 -+ __gmpfr_flags = flags_before;
186 -+ inex_sin = mpfr_sin (s1, x, rnd);
187 -+ flags_sin = __gmpfr_flags;
188 -+ __gmpfr_flags = flags_before;
189 -+ inex_cos = mpfr_cos (c1, x, rnd);
190 -+ flags_cos = __gmpfr_flags;
191 -+ __gmpfr_flags = flags_before;
192 -+ inex = !!mpfr_sin_cos (s2, c2, x, rnd);
193 -+ flags = __gmpfr_flags;
194 -+ inex_ref = inex_sin || inex_cos;
195 -+ flags_ref = flags_sin | flags_cos;
196 -+ if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2)) ||
197 -+ inex != inex_ref || flags != flags_ref)
198 -+ {
199 -+ printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s,"
200 -+ " i = %d\nx = ", mpfr_print_rnd_mode (rnd), i);
201 - mpfr_dump (x);
202 - printf ("s1 = ");
203 - mpfr_dump (s1);
204 -@@ -408,9 +441,16 @@
205 - mpfr_dump (c1);
206 - printf ("c2 = ");
207 - mpfr_dump (c2);
208 -+ printf ("inex_sin = %d, inex_cos = %d, inex = %d (expected %d)\n",
209 -+ inex_sin, inex_cos, inex, inex_ref);
210 -+ printf ("flags_sin = 0x%x, flags_cos = 0x%x, "
211 -+ "flags = 0x%x (expected 0x%x)\n",
212 -+ flags_sin, flags_cos, flags, flags_ref);
213 - exit (1);
214 - }
215 - mpfr_clears (x, s1, s2, c1, c2, (mpfr_ptr) 0);
216 -+ mpfr_set_emin (emin);
217 -+ mpfr_set_emax (emax);
218 - }
219 - }
220 -
221 -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c
222 ---- mpfr-2.4.2-a/version.c 2009-11-30 02:43:08.000000000 +0000
223 -+++ mpfr-2.4.2-b/version.c 2009-12-07 13:37:12.000000000 +0000
224 -@@ -25,5 +25,5 @@
225 - const char *
226 - mpfr_get_version (void)
227 - {
228 -- return "2.4.2";
229 -+ return "2.4.2-p1";
230 - }
231
232 diff --git a/dev-libs/mpfr/files/2.4.2/patch02 b/dev-libs/mpfr/files/2.4.2/patch02
233 deleted file mode 100644
234 index fa85d8ef3c5..00000000000
235 --- a/dev-libs/mpfr/files/2.4.2/patch02
236 +++ /dev/null
237 @@ -1,71 +0,0 @@
238 -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES
239 ---- mpfr-2.4.2-a/PATCHES 2009-12-18 12:03:30.000000000 +0000
240 -+++ mpfr-2.4.2-b/PATCHES 2009-12-18 12:05:19.000000000 +0000
241 -@@ -0,0 +1 @@
242 -+longlong.h
243 -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION
244 ---- mpfr-2.4.2-a/VERSION 2009-12-07 13:37:12.000000000 +0000
245 -+++ mpfr-2.4.2-b/VERSION 2009-12-18 12:05:09.000000000 +0000
246 -@@ -1 +1 @@
247 --2.4.2-p1
248 -+2.4.2-p2
249 -diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h
250 ---- mpfr-2.4.2-a/mpfr-longlong.h 2009-11-30 02:43:08.000000000 +0000
251 -+++ mpfr-2.4.2-b/mpfr-longlong.h 2009-12-18 12:04:29.000000000 +0000
252 -@@ -1011,7 +1011,15 @@
253 - #endif /* __m88000__ */
254 -
255 - #if defined (__mips) && W_TYPE_SIZE == 32
256 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
257 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
258 -+#define umul_ppmm(w1, w0, u, v) \
259 -+ do { \
260 -+ UDItype _r; \
261 -+ _r = (UDItype) u * v; \
262 -+ (w1) = _r >> 32; \
263 -+ (w0) = (USItype) _r; \
264 -+ } while (0)
265 -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
266 - #define umul_ppmm(w1, w0, u, v) \
267 - __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
268 - #else
269 -@@ -1024,7 +1032,16 @@
270 - #endif /* __mips */
271 -
272 - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
273 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
274 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
275 -+typedef unsigned int UTItype __attribute__ ((mode (TI)));
276 -+#define umul_ppmm(w1, w0, u, v) \
277 -+ do { \
278 -+ UTItype _r; \
279 -+ _r = (UTItype) u * v; \
280 -+ (w1) = _r >> 64; \
281 -+ (w0) = (UDItype) _r; \
282 -+ } while (0)
283 -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
284 - #define umul_ppmm(w1, w0, u, v) \
285 - __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
286 - #else
287 -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h
288 ---- mpfr-2.4.2-a/mpfr.h 2009-12-07 13:37:12.000000000 +0000
289 -+++ mpfr-2.4.2-b/mpfr.h 2009-12-18 12:05:09.000000000 +0000
290 -@@ -27,7 +27,7 @@
291 - #define MPFR_VERSION_MAJOR 2
292 - #define MPFR_VERSION_MINOR 4
293 - #define MPFR_VERSION_PATCHLEVEL 2
294 --#define MPFR_VERSION_STRING "2.4.2-p1"
295 -+#define MPFR_VERSION_STRING "2.4.2-p2"
296 -
297 - /* Macros dealing with MPFR VERSION */
298 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
299 -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c
300 ---- mpfr-2.4.2-a/version.c 2009-12-07 13:37:12.000000000 +0000
301 -+++ mpfr-2.4.2-b/version.c 2009-12-18 12:05:09.000000000 +0000
302 -@@ -25,5 +25,5 @@
303 - const char *
304 - mpfr_get_version (void)
305 - {
306 -- return "2.4.2-p1";
307 -+ return "2.4.2-p2";
308 - }
309
310 diff --git a/dev-libs/mpfr/files/2.4.2/patch03 b/dev-libs/mpfr/files/2.4.2/patch03
311 deleted file mode 100644
312 index 3ce4952f2f3..00000000000
313 --- a/dev-libs/mpfr/files/2.4.2/patch03
314 +++ /dev/null
315 @@ -1,75 +0,0 @@
316 -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES
317 ---- mpfr-2.4.2-a/PATCHES 2010-01-11 15:27:18.000000000 +0000
318 -+++ mpfr-2.4.2-b/PATCHES 2010-01-11 15:30:31.000000000 +0000
319 -@@ -0,0 +1 @@
320 -+gmp5
321 -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION
322 ---- mpfr-2.4.2-a/VERSION 2009-12-18 12:05:09.000000000 +0000
323 -+++ mpfr-2.4.2-b/VERSION 2010-01-11 15:29:40.000000000 +0000
324 -@@ -1 +1 @@
325 --2.4.2-p2
326 -+2.4.2-p3
327 -diff -Naurd mpfr-2.4.2-a/configure mpfr-2.4.2-b/configure
328 ---- mpfr-2.4.2-a/configure 2009-11-30 02:44:35.000000000 +0000
329 -+++ mpfr-2.4.2-b/configure 2010-01-11 15:28:56.000000000 +0000
330 -@@ -20449,6 +20449,9 @@
331 - main ()
332 - {
333 -
334 -+#ifndef BITS_PER_MP_LIMB
335 -+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
336 -+#endif
337 - return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
338 - && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
339 -
340 -diff -Naurd mpfr-2.4.2-a/configure.in mpfr-2.4.2-b/configure.in
341 ---- mpfr-2.4.2-a/configure.in 2009-11-30 02:43:08.000000000 +0000
342 -+++ mpfr-2.4.2-b/configure.in 2009-11-30 02:43:08.000000000 +0000
343 -@@ -424,6 +424,9 @@
344 - #include "gmp.h"
345 - #include "gmp-impl.h"
346 - ]], [[
347 -+#ifndef BITS_PER_MP_LIMB
348 -+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
349 -+#endif
350 - return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
351 - && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
352 - ]])], [AC_MSG_RESULT(yes)], [
353 -diff -Naurd mpfr-2.4.2-a/mpfr-impl.h mpfr-2.4.2-b/mpfr-impl.h
354 ---- mpfr-2.4.2-a/mpfr-impl.h 2009-11-30 02:43:08.000000000 +0000
355 -+++ mpfr-2.4.2-b/mpfr-impl.h 2010-01-11 15:28:01.000000000 +0000
356 -@@ -65,6 +65,12 @@
357 - # ifndef __GMP_IMPL_H__
358 - # include "gmp-impl.h"
359 - # endif
360 -+# ifndef BITS_PER_MP_LIMB
361 -+# define BITS_PER_MP_LIMB GMP_LIMB_BITS
362 -+# endif
363 -+#ifndef mpn_sqr_n
364 -+# define mpn_sqr_n mpn_sqr
365 -+#endif
366 - # ifdef MPFR_NEED_LONGLONG_H
367 - # include "longlong.h"
368 - # endif
369 -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h
370 ---- mpfr-2.4.2-a/mpfr.h 2009-12-18 12:05:09.000000000 +0000
371 -+++ mpfr-2.4.2-b/mpfr.h 2010-01-11 15:29:40.000000000 +0000
372 -@@ -27,7 +27,7 @@
373 - #define MPFR_VERSION_MAJOR 2
374 - #define MPFR_VERSION_MINOR 4
375 - #define MPFR_VERSION_PATCHLEVEL 2
376 --#define MPFR_VERSION_STRING "2.4.2-p2"
377 -+#define MPFR_VERSION_STRING "2.4.2-p3"
378 -
379 - /* Macros dealing with MPFR VERSION */
380 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
381 -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c
382 ---- mpfr-2.4.2-a/version.c 2009-12-18 12:05:09.000000000 +0000
383 -+++ mpfr-2.4.2-b/version.c 2010-01-11 15:29:40.000000000 +0000
384 -@@ -25,5 +25,5 @@
385 - const char *
386 - mpfr_get_version (void)
387 - {
388 -- return "2.4.2-p2";
389 -+ return "2.4.2-p3";
390 - }
391
392 diff --git a/dev-libs/mpfr/files/3.1.3/patch01 b/dev-libs/mpfr/files/3.1.3/patch01
393 deleted file mode 100644
394 index d7e1cbf1e42..00000000000
395 --- a/dev-libs/mpfr/files/3.1.3/patch01
396 +++ /dev/null
397 @@ -1,1117 +0,0 @@
398 -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
399 ---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:49:23.950112879 +0000
400 -+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:49:24.042113845 +0000
401 -@@ -0,0 +1 @@
402 -+lngamma-and-doc
403 -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
404 ---- mpfr-3.1.3-a/VERSION 2015-06-19 19:55:09.000000000 +0000
405 -+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:49:24.042113845 +0000
406 -@@ -1 +1 @@
407 --3.1.3
408 -+3.1.3-p1
409 -diff -Naurd mpfr-3.1.3-a/doc/mpfr.texi mpfr-3.1.3-b/doc/mpfr.texi
410 ---- mpfr-3.1.3-a/doc/mpfr.texi 2015-06-19 19:55:11.000000000 +0000
411 -+++ mpfr-3.1.3-b/doc/mpfr.texi 2015-07-02 10:49:24.018113593 +0000
412 -@@ -810,13 +810,17 @@
413 - When the input point is in the closure of the domain of the mathematical
414 - function and an input argument is +0 (resp.@: @minus{}0), one considers
415 - the limit when the corresponding argument approaches 0 from above
416 --(resp.@: below). If the limit is not defined (e.g., @code{mpfr_log} on
417 --@minus{}0), the behavior is specified in the description of the MPFR function.
418 -+(resp.@: below), if possible. If the limit is not defined (e.g.,
419 -+@code{mpfr_sqrt} and @code{mpfr_log} on @minus{}0), the behavior is
420 -+specified in the description of the MPFR function, but must be consistent
421 -+with the rule from the above paragraph (e.g., @code{mpfr_log} on @pom{}0
422 -+gives @minus{}Inf).
423 -
424 - When the result is equal to 0, its sign is determined by considering the
425 - limit as if the input point were not in the domain: If one approaches 0
426 - from above (resp.@: below), the result is +0 (resp.@: @minus{}0);
427 --for example, @code{mpfr_sin} on +0 gives +0.
428 -+for example, @code{mpfr_sin} on @minus{}0 gives @minus{}0 and
429 -+@code{mpfr_acos} on 1 gives +0 (in all rounding modes).
430 - In the other cases, the sign is specified in the description of the MPFR
431 - function; for example @code{mpfr_max} on @minus{}0 and +0 gives +0.
432 -
433 -@@ -832,8 +836,8 @@
434 - @c that advantages in practice), like for any bug fix.
435 - Example: @code{mpfr_hypot} on (NaN,0) gives NaN, but @code{mpfr_hypot}
436 - on (NaN,+Inf) gives +Inf (as specified in @ref{Special Functions}),
437 --since for any finite input @var{x}, @code{mpfr_hypot} on (@var{x},+Inf)
438 --gives +Inf.
439 -+since for any finite or infinite input @var{x}, @code{mpfr_hypot} on
440 -+(@var{x},+Inf) gives +Inf.
441 -
442 - @node Exceptions, Memory Handling, Floating-Point Values on Special Numbers, MPFR Basics
443 - @comment node-name, next, previous, up
444 -@@ -1581,7 +1585,8 @@
445 - @deftypefunx int mpfr_add_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
446 - @deftypefunx int mpfr_add_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
447 - Set @var{rop} to @math{@var{op1} + @var{op2}} rounded in the direction
448 --@var{rnd}. For types having no signed zero, it is considered unsigned
449 -+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
450 -+But for types having no signed zeros, 0 is considered unsigned
451 - (i.e., (+0) + 0 = (+0) and (@minus{}0) + 0 = (@minus{}0)).
452 - The @code{mpfr_add_d} function assumes that the radix of the @code{double} type
453 - is a power of 2, with a precision at most that declared by the C implementation
454 -@@ -1599,7 +1604,8 @@
455 - @deftypefunx int mpfr_sub_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
456 - @deftypefunx int mpfr_sub_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
457 - Set @var{rop} to @math{@var{op1} - @var{op2}} rounded in the direction
458 --@var{rnd}. For types having no signed zero, it is considered unsigned
459 -+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
460 -+But for types having no signed zeros, 0 is considered unsigned
461 - (i.e., (+0) @minus{} 0 = (+0), (@minus{}0) @minus{} 0 = (@minus{}0),
462 - 0 @minus{} (+0) = (@minus{}0) and 0 @minus{} (@minus{}0) = (+0)).
463 - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_sub}
464 -@@ -1615,7 +1621,7 @@
465 - Set @var{rop} to @math{@var{op1} @GMPtimes{} @var{op2}} rounded in the
466 - direction @var{rnd}.
467 - When a result is zero, its sign is the product of the signs of the operands
468 --(for types having no signed zero, it is considered positive).
469 -+(for types having no signed zeros, 0 is considered positive).
470 - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_mul_d}.
471 - @end deftypefun
472 -
473 -@@ -1635,7 +1641,7 @@
474 - @deftypefunx int mpfr_div_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
475 - Set @var{rop} to @math{@var{op1}/@var{op2}} rounded in the direction @var{rnd}.
476 - When a result is zero, its sign is the product of the signs of the operands
477 --(for types having no signed zero, it is considered positive).
478 -+(for types having no signed zeros, 0 is considered positive).
479 - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_div}
480 - and @code{mpfr_div_d}.
481 - @end deftypefun
482 -@@ -1643,15 +1649,18 @@
483 - @deftypefun int mpfr_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
484 - @deftypefunx int mpfr_sqrt_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mpfr_rnd_t @var{rnd})
485 - Set @var{rop} to @m{\sqrt{@var{op}}, the square root of @var{op}}
486 --rounded in the direction @var{rnd} (set @var{rop} to @minus{}0 if @var{op} is
487 --@minus{}0, to be consistent with the IEEE 754 standard).
488 -+rounded in the direction @var{rnd}. Set @var{rop} to @minus{}0 if
489 -+@var{op} is @minus{}0, to be consistent with the IEEE 754 standard.
490 - Set @var{rop} to NaN if @var{op} is negative.
491 - @end deftypefun
492 -
493 - @deftypefun int mpfr_rec_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
494 - Set @var{rop} to @m{1/\sqrt{@var{op}}, the reciprocal square root of @var{op}}
495 --rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
496 --@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative.
497 -+rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
498 -+@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative. Warning!
499 -+Therefore the result on @minus{}0 is different from the one of the rSqrt
500 -+function recommended by the IEEE 754-2008 standard (Section 9.2.1), which
501 -+is @minus{}Inf instead of +Inf.
502 - @end deftypefun
503 -
504 - @deftypefun int mpfr_cbrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
505 -@@ -1832,7 +1841,9 @@
506 - @m{\log_2 @var{op}, log2(@var{op})} or
507 - @m{\log_{10} @var{op}, log10(@var{op})}, respectively,
508 - rounded in the direction @var{rnd}.
509 --Set @var{rop} to @minus{}Inf if @var{op} is @minus{}0
510 -+Set @var{rop} to +0 if @var{op} is 1 (in all rounding modes),
511 -+for consistency with the ISO C99 and IEEE 754-2008 standards.
512 -+Set @var{rop} to @minus{}Inf if @var{op} is @pom{}0
513 - (i.e., the sign of the zero has no influence on the result).
514 - @end deftypefun
515 -
516 -@@ -2003,8 +2014,11 @@
517 - @deftypefun int mpfr_lngamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
518 - Set @var{rop} to the value of the logarithm of the Gamma function on @var{op},
519 - rounded in the direction @var{rnd}.
520 --When @math{@minus{}2@var{k}@minus{}1 @le{} @var{op} @le{} @minus{}2@var{k}},
521 --@var{k} being a non-negative integer, @var{rop} is set to NaN.
522 -+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
523 -+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf,
524 -+following the general rules on special values.
525 -+When @math{@minus{}2@var{k}@minus{}1 < @var{op} < @minus{}2@var{k}},
526 -+@var{k} being a nonnegative integer, set @var{rop} to NaN@.
527 - See also @code{mpfr_lgamma}.
528 - @end deftypefun
529 -
530 -@@ -2012,10 +2026,11 @@
531 - Set @var{rop} to the value of the logarithm of the absolute value of the
532 - Gamma function on @var{op}, rounded in the direction @var{rnd}. The sign
533 - (1 or @minus{}1) of Gamma(@var{op}) is returned in the object pointed to
534 --by @var{signp}. When @var{op} is an infinity or a non-positive integer, set
535 --@var{rop} to +Inf. When @var{op} is NaN, @minus{}Inf or a negative integer,
536 --*@var{signp} is undefined, and when @var{op} is @pom{}0, *@var{signp} is
537 --the sign of the zero.
538 -+by @var{signp}.
539 -+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
540 -+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf.
541 -+When @var{op} is NaN, @minus{}Inf or a negative integer, *@var{signp} is
542 -+undefined, and when @var{op} is @pom{}0, *@var{signp} is the sign of the zero.
543 - @end deftypefun
544 -
545 - @deftypefun int mpfr_digamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
546 -@@ -2064,7 +2079,10 @@
547 - @deftypefunx int mpfr_fms (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_t @var{op3}, mpfr_rnd_t @var{rnd})
548 - Set @var{rop} to @math{(@var{op1} @GMPtimes{} @var{op2}) + @var{op3}}
549 - (resp.@: @math{(@var{op1} @GMPtimes{} @var{op2}) - @var{op3}})
550 --rounded in the direction @var{rnd}.
551 -+rounded in the direction @var{rnd}. Concerning special values (signed zeros,
552 -+infinities, NaN), these functions behave like a multiplication followed by a
553 -+separate addition or subtraction. That is, the fused operation matters only
554 -+for rounding.
555 - @end deftypefun
556 -
557 - @deftypefun int mpfr_agm (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_rnd_t @var{rnd})
558 -@@ -2089,8 +2107,8 @@
559 - i.e., $\sqrt{x^2+y^2}$,
560 - @end tex
561 - rounded in the direction @var{rnd}.
562 --Special values are handled as described in Section F.9.4.3 of
563 --the ISO C99 and IEEE 754-2008 standards:
564 -+Special values are handled as described in the ISO C99 (Section F.9.4.3)
565 -+and IEEE 754-2008 (Section 9.2.1) standards:
566 - If @var{x} or @var{y} is an infinity, then +Inf is returned in @var{rop},
567 - even if the other number is NaN.
568 - @end deftypefun
569 -diff -Naurd mpfr-3.1.3-a/doc/mpfr.info mpfr-3.1.3-b/doc/mpfr.info
570 ---- mpfr-3.1.3-a/doc/mpfr.info 2015-06-19 19:55:53.000000000 +0000
571 -+++ mpfr-3.1.3-b/doc/mpfr.info 2015-07-02 10:49:38.718267817 +0000
572 -@@ -1,4 +1,4 @@
573 --This is mpfr.info, produced by makeinfo version 5.2 from mpfr.texi.
574 -+This is mpfr.info, produced by makeinfo version 6.0 from mpfr.texi.
575 -
576 - This manual documents how to install and use the Multiple Precision
577 - Floating-Point Reliable Library, version 3.1.3.
578 -@@ -55,7 +55,7 @@
579 - MPFR Copying Conditions
580 - ***********************
581 -
582 --The GNU MPFR library (or MPFR for short) is "free"; this means that
583 -+The GNU MPFR library (or MPFR for short) is “free”; this means that
584 - everyone is free to use it and free to redistribute it on a free basis.
585 - The library is not in the public domain; it is copyrighted and there are
586 - restrictions on its distribution, but these restrictions are designed to
587 -@@ -418,7 +418,7 @@
588 - 4.2 Nomenclature and Types
589 - ==========================
590 -
591 --A "floating-point number", or "float" for short, is an arbitrary
592 -+A “floating-point number”, or “float” for short, is an arbitrary
593 - precision significand (also called mantissa) with a limited precision
594 - exponent. The C data type for such objects is ‘mpfr_t’ (internally
595 - defined as a one-element array of a structure, and ‘mpfr_ptr’ is the C
596 -@@ -432,7 +432,7 @@
597 - to the other functions supported by MPFR. Unless documented otherwise,
598 - the sign bit of a NaN is unspecified.
599 -
600 --The "precision" is the number of bits used to represent the significand
601 -+The “precision” is the number of bits used to represent the significand
602 - of a floating-point number; the corresponding C data type is
603 - ‘mpfr_prec_t’. The precision can be any integer between ‘MPFR_PREC_MIN’
604 - and ‘MPFR_PREC_MAX’. In the current implementation, ‘MPFR_PREC_MIN’ is
605 -@@ -446,7 +446,7 @@
606 - may abort, crash or have undefined behavior (depending on your C
607 - implementation).
608 -
609 --The "rounding mode" specifies the way to round the result of a
610 -+The “rounding mode” specifies the way to round the result of a
611 - floating-point operation, in case the exact result can not be
612 - represented exactly in the destination significand; the corresponding C
613 - data type is ‘mpfr_rnd_t’.
614 -@@ -499,14 +499,14 @@
615 - representable numbers, it is rounded to the one with the least
616 - significant bit set to zero. For example, the number 2.5, which is
617 - represented by (10.1) in binary, is rounded to (10.0)=2 with a precision
618 --of two bits, and not to (11.0)=3. This rule avoids the "drift"
619 -+of two bits, and not to (11.0)=3. This rule avoids the “drift”
620 - phenomenon mentioned by Knuth in volume 2 of The Art of Computer
621 - Programming (Section 4.2.2).
622 -
623 - Most MPFR functions take as first argument the destination variable,
624 - as second and following arguments the input variables, as last argument
625 - a rounding mode, and have a return value of type ‘int’, called the
626 --"ternary value". The value stored in the destination variable is
627 -+“ternary value”. The value stored in the destination variable is
628 - correctly rounded, i.e., MPFR behaves as if it computed the result with
629 - an infinite precision, then rounded it to the precision of this
630 - variable. The input variables are regarded as exact (in particular,
631 -@@ -572,15 +572,18 @@
632 - When the input point is in the closure of the domain of the
633 - mathematical function and an input argument is +0 (resp. −0), one
634 - considers the limit when the corresponding argument approaches 0 from
635 --above (resp. below). If the limit is not defined (e.g., ‘mpfr_log’ on
636 --−0), the behavior is specified in the description of the MPFR function.
637 -+above (resp. below), if possible. If the limit is not defined (e.g.,
638 -+‘mpfr_sqrt’ and ‘mpfr_log’ on −0), the behavior is specified in the
639 -+description of the MPFR function, but must be consistent with the rule
640 -+from the above paragraph (e.g., ‘mpfr_log’ on ±0 gives −Inf).
641 -
642 - When the result is equal to 0, its sign is determined by considering
643 - the limit as if the input point were not in the domain: If one
644 - approaches 0 from above (resp. below), the result is +0 (resp. −0); for
645 --example, ‘mpfr_sin’ on +0 gives +0. In the other cases, the sign is
646 --specified in the description of the MPFR function; for example
647 --‘mpfr_max’ on −0 and +0 gives +0.
648 -+example, ‘mpfr_sin’ on −0 gives −0 and ‘mpfr_acos’ on 1 gives +0 (in all
649 -+rounding modes). In the other cases, the sign is specified in the
650 -+description of the MPFR function; for example ‘mpfr_max’ on −0 and +0
651 -+gives +0.
652 -
653 - When the input point is not in the closure of the domain of the
654 - function, the result is NaN. Example: ‘mpfr_sqrt’ on −17 gives NaN.
655 -@@ -590,8 +593,8 @@
656 - numbers; such a case is always explicitly specified in *note MPFR
657 - Interface::. Example: ‘mpfr_hypot’ on (NaN,0) gives NaN, but
658 - ‘mpfr_hypot’ on (NaN,+Inf) gives +Inf (as specified in *note Special
659 --Functions::), since for any finite input X, ‘mpfr_hypot’ on (X,+Inf)
660 --gives +Inf.
661 -+Functions::), since for any finite or infinite input X, ‘mpfr_hypot’ on
662 -+(X,+Inf) gives +Inf.
663 -
664 - 
665 - File: mpfr.info, Node: Exceptions, Next: Memory Handling, Prev: Floating-Point Values on Special Numbers, Up: MPFR Basics
666 -@@ -1253,8 +1256,9 @@
667 - mpfr_rnd_t RND)
668 - -- Function: int mpfr_add_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
669 - mpfr_rnd_t RND)
670 -- Set ROP to OP1 + OP2 rounded in the direction RND. For types
671 -- having no signed zero, it is considered unsigned (i.e., (+0) + 0 =
672 -+ Set ROP to OP1 + OP2 rounded in the direction RND. The IEEE-754
673 -+ rules are used, in particular for signed zeros. But for types
674 -+ having no signed zeros, 0 is considered unsigned (i.e., (+0) + 0 =
675 - (+0) and (−0) + 0 = (−0)). The ‘mpfr_add_d’ function assumes that
676 - the radix of the ‘double’ type is a power of 2, with a precision at
677 - most that declared by the C implementation (macro
678 -@@ -1280,8 +1284,9 @@
679 - mpfr_rnd_t RND)
680 - -- Function: int mpfr_sub_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
681 - mpfr_rnd_t RND)
682 -- Set ROP to OP1 - OP2 rounded in the direction RND. For types
683 -- having no signed zero, it is considered unsigned (i.e., (+0) − 0 =
684 -+ Set ROP to OP1 - OP2 rounded in the direction RND. The IEEE-754
685 -+ rules are used, in particular for signed zeros. But for types
686 -+ having no signed zeros, 0 is considered unsigned (i.e., (+0) − 0 =
687 - (+0), (−0) − 0 = (−0), 0 − (+0) = (−0) and 0 − (−0) = (+0)). The
688 - same restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_sub’ and
689 - ‘mpfr_sub_d’.
690 -@@ -1300,7 +1305,7 @@
691 - mpfr_rnd_t RND)
692 - Set ROP to OP1 times OP2 rounded in the direction RND. When a
693 - result is zero, its sign is the product of the signs of the
694 -- operands (for types having no signed zero, it is considered
695 -+ operands (for types having no signed zeros, 0 is considered
696 - positive). The same restrictions than for ‘mpfr_add_d’ apply to
697 - ‘mpfr_mul_d’.
698 -
699 -@@ -1327,21 +1332,24 @@
700 - mpfr_rnd_t RND)
701 - Set ROP to OP1/OP2 rounded in the direction RND. When a result is
702 - zero, its sign is the product of the signs of the operands (for
703 -- types having no signed zero, it is considered positive). The same
704 -+ types having no signed zeros, 0 is considered positive). The same
705 - restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_div’ and
706 - ‘mpfr_div_d’.
707 -
708 - -- Function: int mpfr_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
709 - -- Function: int mpfr_sqrt_ui (mpfr_t ROP, unsigned long int OP,
710 - mpfr_rnd_t RND)
711 -- Set ROP to the square root of OP rounded in the direction RND (set
712 -- ROP to −0 if OP is −0, to be consistent with the IEEE 754
713 -- standard). Set ROP to NaN if OP is negative.
714 -+ Set ROP to the square root of OP rounded in the direction RND. Set
715 -+ ROP to −0 if OP is −0, to be consistent with the IEEE 754 standard.
716 -+ Set ROP to NaN if OP is negative.
717 -
718 - -- Function: int mpfr_rec_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
719 - Set ROP to the reciprocal square root of OP rounded in the
720 - direction RND. Set ROP to +Inf if OP is ±0, +0 if OP is +Inf, and
721 -- NaN if OP is negative.
722 -+ NaN if OP is negative. Warning! Therefore the result on −0 is
723 -+ different from the one of the rSqrt function recommended by the
724 -+ IEEE 754-2008 standard (Section 9.2.1), which is −Inf instead of
725 -+ +Inf.
726 -
727 - -- Function: int mpfr_cbrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
728 - -- Function: int mpfr_root (mpfr_t ROP, mpfr_t OP, unsigned long int K,
729 -@@ -1515,8 +1523,10 @@
730 - -- Function: int mpfr_log2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
731 - -- Function: int mpfr_log10 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
732 - Set ROP to the natural logarithm of OP, log2(OP) or log10(OP),
733 -- respectively, rounded in the direction RND. Set ROP to −Inf if OP
734 -- is −0 (i.e., the sign of the zero has no influence on the result).
735 -+ respectively, rounded in the direction RND. Set ROP to +0 if OP is
736 -+ 1 (in all rounding modes), for consistency with the ISO C99 and
737 -+ IEEE 754-2008 standards. Set ROP to −Inf if OP is ±0 (i.e., the
738 -+ sign of the zero has no influence on the result).
739 -
740 - -- Function: int mpfr_exp (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
741 - -- Function: int mpfr_exp2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
742 -@@ -1649,17 +1659,21 @@
743 -
744 - -- Function: int mpfr_lngamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
745 - Set ROP to the value of the logarithm of the Gamma function on OP,
746 -- rounded in the direction RND. When −2K−1 <= OP <= −2K, K being a
747 -- non-negative integer, ROP is set to NaN. See also ‘mpfr_lgamma’.
748 -+ rounded in the direction RND. When OP is 1 or 2, set ROP to +0 (in
749 -+ all rounding modes). When OP is an infinity or a nonpositive
750 -+ integer, set ROP to +Inf, following the general rules on special
751 -+ values. When −2K−1 < OP < −2K, K being a nonnegative integer, set
752 -+ ROP to NaN. See also ‘mpfr_lgamma’.
753 -
754 - -- Function: int mpfr_lgamma (mpfr_t ROP, int *SIGNP, mpfr_t OP,
755 - mpfr_rnd_t RND)
756 - Set ROP to the value of the logarithm of the absolute value of the
757 - Gamma function on OP, rounded in the direction RND. The sign (1 or
758 - −1) of Gamma(OP) is returned in the object pointed to by SIGNP.
759 -- When OP is an infinity or a non-positive integer, set ROP to +Inf.
760 -- When OP is NaN, −Inf or a negative integer, *SIGNP is undefined,
761 -- and when OP is ±0, *SIGNP is the sign of the zero.
762 -+ When OP is 1 or 2, set ROP to +0 (in all rounding modes). When OP
763 -+ is an infinity or a nonpositive integer, set ROP to +Inf. When OP
764 -+ is NaN, −Inf or a negative integer, *SIGNP is undefined, and when
765 -+ OP is ±0, *SIGNP is the sign of the zero.
766 -
767 - -- Function: int mpfr_digamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
768 - Set ROP to the value of the Digamma (sometimes also called Psi)
769 -@@ -1703,7 +1717,10 @@
770 - -- Function: int mpfr_fms (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2, mpfr_t
771 - OP3, mpfr_rnd_t RND)
772 - Set ROP to (OP1 times OP2) + OP3 (resp. (OP1 times OP2) - OP3)
773 -- rounded in the direction RND.
774 -+ rounded in the direction RND. Concerning special values (signed
775 -+ zeros, infinities, NaN), these functions behave like a
776 -+ multiplication followed by a separate addition or subtraction.
777 -+ That is, the fused operation matters only for rounding.
778 -
779 - -- Function: int mpfr_agm (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2,
780 - mpfr_rnd_t RND)
781 -@@ -1717,9 +1734,10 @@
782 - RND)
783 - Set ROP to the Euclidean norm of X and Y, i.e., the square root of
784 - the sum of the squares of X and Y, rounded in the direction RND.
785 -- Special values are handled as described in Section F.9.4.3 of the
786 -- ISO C99 and IEEE 754-2008 standards: If X or Y is an infinity, then
787 -- +Inf is returned in ROP, even if the other number is NaN.
788 -+ Special values are handled as described in the ISO C99 (Section
789 -+ F.9.4.3) and IEEE 754-2008 (Section 9.2.1) standards: If X or Y is
790 -+ an infinity, then +Inf is returned in ROP, even if the other number
791 -+ is NaN.
792 -
793 - -- Function: int mpfr_ai (mpfr_t ROP, mpfr_t X, mpfr_rnd_t RND)
794 - Set ROP to the value of the Airy function Ai on X, rounded in the
795 -@@ -2670,7 +2688,7 @@
796 - 5.16 Internals
797 - ==============
798 -
799 --A "limb" means the part of a multi-precision number that fits in a
800 -+A “limb” means the part of a multi-precision number that fits in a
801 - single word. Usually a limb contains 32 or 64 bits. The C data type
802 - for a limb is ‘mp_limb_t’.
803 -
804 -@@ -3140,7 +3158,7 @@
805 - 0. PREAMBLE
806 -
807 - The purpose of this License is to make a manual, textbook, or other
808 -- functional and useful document "free" in the sense of freedom: to
809 -+ functional and useful document “free” in the sense of freedom: to
810 - assure everyone the effective freedom to copy and redistribute it,
811 - with or without modifying it, either commercially or
812 - noncommercially. Secondarily, this License preserves for the
813 -@@ -3655,9 +3673,9 @@
814 - * Menu:
815 -
816 - * mpfr_abs: Basic Arithmetic Functions.
817 -- (line 160)
818 --* mpfr_acos: Special Functions. (line 51)
819 --* mpfr_acosh: Special Functions. (line 115)
820 -+ (line 165)
821 -+* mpfr_acos: Special Functions. (line 53)
822 -+* mpfr_acosh: Special Functions. (line 117)
823 - * mpfr_add: Basic Arithmetic Functions.
824 - (line 6)
825 - * mpfr_add_d: Basic Arithmetic Functions.
826 -@@ -3670,15 +3688,15 @@
827 - (line 8)
828 - * mpfr_add_z: Basic Arithmetic Functions.
829 - (line 14)
830 --* mpfr_agm: Special Functions. (line 210)
831 --* mpfr_ai: Special Functions. (line 226)
832 --* mpfr_asin: Special Functions. (line 52)
833 --* mpfr_asinh: Special Functions. (line 116)
834 -+* mpfr_agm: Special Functions. (line 219)
835 -+* mpfr_ai: Special Functions. (line 236)
836 -+* mpfr_asin: Special Functions. (line 54)
837 -+* mpfr_asinh: Special Functions. (line 118)
838 - * mpfr_asprintf: Formatted Output Functions.
839 - (line 193)
840 --* mpfr_atan: Special Functions. (line 53)
841 --* mpfr_atan2: Special Functions. (line 63)
842 --* mpfr_atanh: Special Functions. (line 117)
843 -+* mpfr_atan: Special Functions. (line 55)
844 -+* mpfr_atan2: Special Functions. (line 65)
845 -+* mpfr_atanh: Special Functions. (line 119)
846 - * mpfr_buildopt_decimal_p: Miscellaneous Functions.
847 - (line 162)
848 - * mpfr_buildopt_gmpinternals_p: Miscellaneous Functions.
849 -@@ -3690,7 +3708,7 @@
850 - * mpfr_can_round: Rounding Related Functions.
851 - (line 39)
852 - * mpfr_cbrt: Basic Arithmetic Functions.
853 -- (line 108)
854 -+ (line 113)
855 - * mpfr_ceil: Integer Related Functions.
856 - (line 7)
857 - * mpfr_check_range: Exception Related Functions.
858 -@@ -3735,18 +3753,18 @@
859 - (line 27)
860 - * mpfr_cmp_z: Comparison Functions.
861 - (line 11)
862 --* mpfr_const_catalan: Special Functions. (line 237)
863 --* mpfr_const_euler: Special Functions. (line 236)
864 --* mpfr_const_log2: Special Functions. (line 234)
865 --* mpfr_const_pi: Special Functions. (line 235)
866 -+* mpfr_const_catalan: Special Functions. (line 247)
867 -+* mpfr_const_euler: Special Functions. (line 246)
868 -+* mpfr_const_log2: Special Functions. (line 244)
869 -+* mpfr_const_pi: Special Functions. (line 245)
870 - * mpfr_copysign: Miscellaneous Functions.
871 - (line 109)
872 --* mpfr_cos: Special Functions. (line 29)
873 --* mpfr_cosh: Special Functions. (line 95)
874 --* mpfr_cot: Special Functions. (line 47)
875 --* mpfr_coth: Special Functions. (line 111)
876 --* mpfr_csc: Special Functions. (line 46)
877 --* mpfr_csch: Special Functions. (line 110)
878 -+* mpfr_cos: Special Functions. (line 31)
879 -+* mpfr_cosh: Special Functions. (line 97)
880 -+* mpfr_cot: Special Functions. (line 49)
881 -+* mpfr_coth: Special Functions. (line 113)
882 -+* mpfr_csc: Special Functions. (line 48)
883 -+* mpfr_csch: Special Functions. (line 112)
884 - * mpfr_custom_get_exp: Custom Interface. (line 75)
885 - * mpfr_custom_get_kind: Custom Interface. (line 65)
886 - * mpfr_custom_get_significand: Custom Interface. (line 70)
887 -@@ -3756,47 +3774,47 @@
888 - * mpfr_custom_move: Custom Interface. (line 82)
889 - * MPFR_DECL_INIT: Initialization Functions.
890 - (line 74)
891 --* mpfr_digamma: Special Functions. (line 166)
892 -+* mpfr_digamma: Special Functions. (line 172)
893 - * mpfr_dim: Basic Arithmetic Functions.
894 -- (line 166)
895 -+ (line 171)
896 - * mpfr_div: Basic Arithmetic Functions.
897 -- (line 72)
898 -+ (line 74)
899 - * mpfr_divby0_p: Exception Related Functions.
900 - (line 134)
901 - * mpfr_div_2exp: Compatibility with MPF.
902 - (line 49)
903 - * mpfr_div_2si: Basic Arithmetic Functions.
904 -- (line 181)
905 -+ (line 186)
906 - * mpfr_div_2ui: Basic Arithmetic Functions.
907 -- (line 179)
908 -+ (line 184)
909 - * mpfr_div_d: Basic Arithmetic Functions.
910 -- (line 84)
911 -+ (line 86)
912 - * mpfr_div_q: Basic Arithmetic Functions.
913 -- (line 88)
914 -+ (line 90)
915 - * mpfr_div_si: Basic Arithmetic Functions.
916 -- (line 80)
917 -+ (line 82)
918 - * mpfr_div_ui: Basic Arithmetic Functions.
919 -- (line 76)
920 -+ (line 78)
921 - * mpfr_div_z: Basic Arithmetic Functions.
922 -- (line 86)
923 -+ (line 88)
924 - * mpfr_d_div: Basic Arithmetic Functions.
925 -- (line 82)
926 -+ (line 84)
927 - * mpfr_d_sub: Basic Arithmetic Functions.
928 -- (line 35)
929 --* mpfr_eint: Special Functions. (line 133)
930 -+ (line 36)
931 -+* mpfr_eint: Special Functions. (line 135)
932 - * mpfr_eq: Compatibility with MPF.
933 - (line 28)
934 - * mpfr_equal_p: Comparison Functions.
935 - (line 59)
936 - * mpfr_erangeflag_p: Exception Related Functions.
937 - (line 137)
938 --* mpfr_erf: Special Functions. (line 177)
939 --* mpfr_erfc: Special Functions. (line 178)
940 --* mpfr_exp: Special Functions. (line 23)
941 --* mpfr_exp10: Special Functions. (line 25)
942 --* mpfr_exp2: Special Functions. (line 24)
943 --* mpfr_expm1: Special Functions. (line 129)
944 --* mpfr_fac_ui: Special Functions. (line 121)
945 -+* mpfr_erf: Special Functions. (line 183)
946 -+* mpfr_erfc: Special Functions. (line 184)
947 -+* mpfr_exp: Special Functions. (line 25)
948 -+* mpfr_exp10: Special Functions. (line 27)
949 -+* mpfr_exp2: Special Functions. (line 26)
950 -+* mpfr_expm1: Special Functions. (line 131)
951 -+* mpfr_fac_ui: Special Functions. (line 123)
952 - * mpfr_fits_intmax_p: Conversion Functions.
953 - (line 150)
954 - * mpfr_fits_sint_p: Conversion Functions.
955 -@@ -3815,20 +3833,20 @@
956 - (line 147)
957 - * mpfr_floor: Integer Related Functions.
958 - (line 8)
959 --* mpfr_fma: Special Functions. (line 203)
960 -+* mpfr_fma: Special Functions. (line 209)
961 - * mpfr_fmod: Integer Related Functions.
962 - (line 92)
963 --* mpfr_fms: Special Functions. (line 205)
964 -+* mpfr_fms: Special Functions. (line 211)
965 - * mpfr_fprintf: Formatted Output Functions.
966 - (line 157)
967 - * mpfr_frac: Integer Related Functions.
968 - (line 76)
969 --* mpfr_free_cache: Special Functions. (line 244)
970 -+* mpfr_free_cache: Special Functions. (line 254)
971 - * mpfr_free_str: Conversion Functions.
972 - (line 137)
973 - * mpfr_frexp: Conversion Functions.
974 - (line 45)
975 --* mpfr_gamma: Special Functions. (line 148)
976 -+* mpfr_gamma: Special Functions. (line 150)
977 - * mpfr_get_d: Conversion Functions.
978 - (line 7)
979 - * mpfr_get_decimal64: Conversion Functions.
980 -@@ -3887,7 +3905,7 @@
981 - (line 56)
982 - * mpfr_greater_p: Comparison Functions.
983 - (line 55)
984 --* mpfr_hypot: Special Functions. (line 218)
985 -+* mpfr_hypot: Special Functions. (line 227)
986 - * mpfr_inexflag_p: Exception Related Functions.
987 - (line 136)
988 - * mpfr_inf_p: Comparison Functions.
989 -@@ -3922,21 +3940,21 @@
990 - (line 31)
991 - * mpfr_integer_p: Integer Related Functions.
992 - (line 119)
993 --* mpfr_j0: Special Functions. (line 182)
994 --* mpfr_j1: Special Functions. (line 183)
995 --* mpfr_jn: Special Functions. (line 184)
996 -+* mpfr_j0: Special Functions. (line 188)
997 -+* mpfr_j1: Special Functions. (line 189)
998 -+* mpfr_jn: Special Functions. (line 190)
999 - * mpfr_lessequal_p: Comparison Functions.
1000 - (line 58)
1001 - * mpfr_lessgreater_p: Comparison Functions.
1002 - (line 64)
1003 - * mpfr_less_p: Comparison Functions.
1004 - (line 57)
1005 --* mpfr_lgamma: Special Functions. (line 157)
1006 --* mpfr_li2: Special Functions. (line 143)
1007 --* mpfr_lngamma: Special Functions. (line 152)
1008 -+* mpfr_lgamma: Special Functions. (line 162)
1009 -+* mpfr_li2: Special Functions. (line 145)
1010 -+* mpfr_lngamma: Special Functions. (line 154)
1011 - * mpfr_log: Special Functions. (line 16)
1012 - * mpfr_log10: Special Functions. (line 18)
1013 --* mpfr_log1p: Special Functions. (line 125)
1014 -+* mpfr_log1p: Special Functions. (line 127)
1015 - * mpfr_log2: Special Functions. (line 17)
1016 - * mpfr_max: Miscellaneous Functions.
1017 - (line 22)
1018 -@@ -3947,29 +3965,29 @@
1019 - * mpfr_modf: Integer Related Functions.
1020 - (line 82)
1021 - * mpfr_mul: Basic Arithmetic Functions.
1022 -- (line 51)
1023 -+ (line 53)
1024 - * mpfr_mul_2exp: Compatibility with MPF.
1025 - (line 47)
1026 - * mpfr_mul_2si: Basic Arithmetic Functions.
1027 -- (line 174)
1028 -+ (line 179)
1029 - * mpfr_mul_2ui: Basic Arithmetic Functions.
1030 -- (line 172)
1031 -+ (line 177)
1032 - * mpfr_mul_d: Basic Arithmetic Functions.
1033 -- (line 57)
1034 -+ (line 59)
1035 - * mpfr_mul_q: Basic Arithmetic Functions.
1036 -- (line 61)
1037 -+ (line 63)
1038 - * mpfr_mul_si: Basic Arithmetic Functions.
1039 -- (line 55)
1040 -+ (line 57)
1041 - * mpfr_mul_ui: Basic Arithmetic Functions.
1042 -- (line 53)
1043 -+ (line 55)
1044 - * mpfr_mul_z: Basic Arithmetic Functions.
1045 -- (line 59)
1046 -+ (line 61)
1047 - * mpfr_nanflag_p: Exception Related Functions.
1048 - (line 135)
1049 - * mpfr_nan_p: Comparison Functions.
1050 - (line 39)
1051 - * mpfr_neg: Basic Arithmetic Functions.
1052 -- (line 159)
1053 -+ (line 164)
1054 - * mpfr_nextabove: Miscellaneous Functions.
1055 - (line 15)
1056 - * mpfr_nextbelow: Miscellaneous Functions.
1057 -@@ -3983,13 +4001,13 @@
1058 - * mpfr_overflow_p: Exception Related Functions.
1059 - (line 133)
1060 - * mpfr_pow: Basic Arithmetic Functions.
1061 -- (line 116)
1062 -+ (line 121)
1063 - * mpfr_pow_si: Basic Arithmetic Functions.
1064 -- (line 120)
1065 -+ (line 125)
1066 - * mpfr_pow_ui: Basic Arithmetic Functions.
1067 -- (line 118)
1068 -+ (line 123)
1069 - * mpfr_pow_z: Basic Arithmetic Functions.
1070 -- (line 122)
1071 -+ (line 127)
1072 - * mpfr_prec_round: Rounding Related Functions.
1073 - (line 13)
1074 - * ‘mpfr_prec_t’: Nomenclature and Types.
1075 -@@ -3999,7 +4017,7 @@
1076 - * mpfr_print_rnd_mode: Rounding Related Functions.
1077 - (line 71)
1078 - * mpfr_rec_sqrt: Basic Arithmetic Functions.
1079 -- (line 103)
1080 -+ (line 105)
1081 - * mpfr_regular_p: Comparison Functions.
1082 - (line 43)
1083 - * mpfr_reldiff: Compatibility with MPF.
1084 -@@ -4021,11 +4039,11 @@
1085 - * ‘mpfr_rnd_t’: Nomenclature and Types.
1086 - (line 34)
1087 - * mpfr_root: Basic Arithmetic Functions.
1088 -- (line 109)
1089 -+ (line 114)
1090 - * mpfr_round: Integer Related Functions.
1091 - (line 9)
1092 --* mpfr_sec: Special Functions. (line 45)
1093 --* mpfr_sech: Special Functions. (line 109)
1094 -+* mpfr_sec: Special Functions. (line 47)
1095 -+* mpfr_sech: Special Functions. (line 111)
1096 - * mpfr_set: Assignment Functions.
1097 - (line 9)
1098 - * mpfr_setsign: Miscellaneous Functions.
1099 -@@ -4100,57 +4118,57 @@
1100 - (line 49)
1101 - * mpfr_signbit: Miscellaneous Functions.
1102 - (line 99)
1103 --* mpfr_sin: Special Functions. (line 30)
1104 --* mpfr_sinh: Special Functions. (line 96)
1105 --* mpfr_sinh_cosh: Special Functions. (line 101)
1106 --* mpfr_sin_cos: Special Functions. (line 35)
1107 -+* mpfr_sin: Special Functions. (line 32)
1108 -+* mpfr_sinh: Special Functions. (line 98)
1109 -+* mpfr_sinh_cosh: Special Functions. (line 103)
1110 -+* mpfr_sin_cos: Special Functions. (line 37)
1111 - * mpfr_si_div: Basic Arithmetic Functions.
1112 -- (line 78)
1113 -+ (line 80)
1114 - * mpfr_si_sub: Basic Arithmetic Functions.
1115 -- (line 31)
1116 -+ (line 32)
1117 - * mpfr_snprintf: Formatted Output Functions.
1118 - (line 180)
1119 - * mpfr_sprintf: Formatted Output Functions.
1120 - (line 170)
1121 - * mpfr_sqr: Basic Arithmetic Functions.
1122 -- (line 69)
1123 -+ (line 71)
1124 - * mpfr_sqrt: Basic Arithmetic Functions.
1125 -- (line 96)
1126 -+ (line 98)
1127 - * mpfr_sqrt_ui: Basic Arithmetic Functions.
1128 -- (line 97)
1129 -+ (line 99)
1130 - * mpfr_strtofr: Assignment Functions.
1131 - (line 80)
1132 - * mpfr_sub: Basic Arithmetic Functions.
1133 -- (line 25)
1134 -+ (line 26)
1135 - * mpfr_subnormalize: Exception Related Functions.
1136 - (line 60)
1137 - * mpfr_sub_d: Basic Arithmetic Functions.
1138 -- (line 37)
1139 -+ (line 38)
1140 - * mpfr_sub_q: Basic Arithmetic Functions.
1141 -- (line 43)
1142 -+ (line 44)
1143 - * mpfr_sub_si: Basic Arithmetic Functions.
1144 -- (line 33)
1145 -+ (line 34)
1146 - * mpfr_sub_ui: Basic Arithmetic Functions.
1147 -- (line 29)
1148 -+ (line 30)
1149 - * mpfr_sub_z: Basic Arithmetic Functions.
1150 -- (line 41)
1151 --* mpfr_sum: Special Functions. (line 252)
1152 -+ (line 42)
1153 -+* mpfr_sum: Special Functions. (line 262)
1154 - * mpfr_swap: Assignment Functions.
1155 - (line 150)
1156 - * ‘mpfr_t’: Nomenclature and Types.
1157 - (line 6)
1158 --* mpfr_tan: Special Functions. (line 31)
1159 --* mpfr_tanh: Special Functions. (line 97)
1160 -+* mpfr_tan: Special Functions. (line 33)
1161 -+* mpfr_tanh: Special Functions. (line 99)
1162 - * mpfr_trunc: Integer Related Functions.
1163 - (line 10)
1164 - * mpfr_ui_div: Basic Arithmetic Functions.
1165 -- (line 74)
1166 -+ (line 76)
1167 - * mpfr_ui_pow: Basic Arithmetic Functions.
1168 -- (line 126)
1169 -+ (line 131)
1170 - * mpfr_ui_pow_ui: Basic Arithmetic Functions.
1171 -- (line 124)
1172 -+ (line 129)
1173 - * mpfr_ui_sub: Basic Arithmetic Functions.
1174 -- (line 27)
1175 -+ (line 28)
1176 - * mpfr_underflow_p: Exception Related Functions.
1177 - (line 132)
1178 - * mpfr_unordered_p: Comparison Functions.
1179 -@@ -4181,61 +4199,61 @@
1180 - (line 182)
1181 - * mpfr_vsprintf: Formatted Output Functions.
1182 - (line 171)
1183 --* mpfr_y0: Special Functions. (line 193)
1184 --* mpfr_y1: Special Functions. (line 194)
1185 --* mpfr_yn: Special Functions. (line 195)
1186 -+* mpfr_y0: Special Functions. (line 199)
1187 -+* mpfr_y1: Special Functions. (line 200)
1188 -+* mpfr_yn: Special Functions. (line 201)
1189 - * mpfr_zero_p: Comparison Functions.
1190 - (line 42)
1191 --* mpfr_zeta: Special Functions. (line 171)
1192 --* mpfr_zeta_ui: Special Functions. (line 172)
1193 -+* mpfr_zeta: Special Functions. (line 177)
1194 -+* mpfr_zeta_ui: Special Functions. (line 178)
1195 - * mpfr_z_sub: Basic Arithmetic Functions.
1196 -- (line 39)
1197 -+ (line 40)
1198 -
1199 -
1200 - 
1201 - Tag Table:
1202 - Node: Top775
1203 - Node: Copying2007
1204 --Node: Introduction to MPFR3766
1205 --Node: Installing MPFR5880
1206 --Node: Reporting Bugs11323
1207 --Node: MPFR Basics13353
1208 --Node: Headers and Libraries13669
1209 --Node: Nomenclature and Types16828
1210 --Node: MPFR Variable Conventions18874
1211 --Node: Rounding Modes20418
1212 --Ref: ternary value21544
1213 --Node: Floating-Point Values on Special Numbers23526
1214 --Node: Exceptions26572
1215 --Node: Memory Handling29749
1216 --Node: MPFR Interface30894
1217 --Node: Initialization Functions33008
1218 --Node: Assignment Functions40318
1219 --Node: Combined Initialization and Assignment Functions49673
1220 --Node: Conversion Functions50974
1221 --Node: Basic Arithmetic Functions60035
1222 --Node: Comparison Functions69200
1223 --Node: Special Functions72687
1224 --Node: Input and Output Functions86672
1225 --Node: Formatted Output Functions88644
1226 --Node: Integer Related Functions98431
1227 --Node: Rounding Related Functions105051
1228 --Node: Miscellaneous Functions108888
1229 --Node: Exception Related Functions117568
1230 --Node: Compatibility with MPF124386
1231 --Node: Custom Interface127127
1232 --Node: Internals131526
1233 --Node: API Compatibility133066
1234 --Node: Type and Macro Changes134995
1235 --Node: Added Functions137844
1236 --Node: Changed Functions141132
1237 --Node: Removed Functions145545
1238 --Node: Other Changes145973
1239 --Node: Contributors147576
1240 --Node: References150219
1241 --Node: GNU Free Documentation License151973
1242 --Node: Concept Index174562
1243 --Node: Function and Type Index180659
1244 -+Node: Introduction to MPFR3770
1245 -+Node: Installing MPFR5884
1246 -+Node: Reporting Bugs11327
1247 -+Node: MPFR Basics13357
1248 -+Node: Headers and Libraries13673
1249 -+Node: Nomenclature and Types16832
1250 -+Node: MPFR Variable Conventions18894
1251 -+Node: Rounding Modes20438
1252 -+Ref: ternary value21568
1253 -+Node: Floating-Point Values on Special Numbers23554
1254 -+Node: Exceptions26813
1255 -+Node: Memory Handling29990
1256 -+Node: MPFR Interface31135
1257 -+Node: Initialization Functions33249
1258 -+Node: Assignment Functions40559
1259 -+Node: Combined Initialization and Assignment Functions49914
1260 -+Node: Conversion Functions51215
1261 -+Node: Basic Arithmetic Functions60276
1262 -+Node: Comparison Functions69777
1263 -+Node: Special Functions73264
1264 -+Node: Input and Output Functions87862
1265 -+Node: Formatted Output Functions89834
1266 -+Node: Integer Related Functions99621
1267 -+Node: Rounding Related Functions106241
1268 -+Node: Miscellaneous Functions110078
1269 -+Node: Exception Related Functions118758
1270 -+Node: Compatibility with MPF125576
1271 -+Node: Custom Interface128317
1272 -+Node: Internals132716
1273 -+Node: API Compatibility134260
1274 -+Node: Type and Macro Changes136189
1275 -+Node: Added Functions139038
1276 -+Node: Changed Functions142326
1277 -+Node: Removed Functions146739
1278 -+Node: Other Changes147167
1279 -+Node: Contributors148770
1280 -+Node: References151413
1281 -+Node: GNU Free Documentation License153167
1282 -+Node: Concept Index175760
1283 -+Node: Function and Type Index181857
1284 - 
1285 - End Tag Table
1286 -
1287 -diff -Naurd mpfr-3.1.3-a/src/lngamma.c mpfr-3.1.3-b/src/lngamma.c
1288 ---- mpfr-3.1.3-a/src/lngamma.c 2015-06-19 19:55:10.000000000 +0000
1289 -+++ mpfr-3.1.3-b/src/lngamma.c 2015-07-02 10:49:24.018113593 +0000
1290 -@@ -603,16 +603,17 @@
1291 - mpfr_get_prec (y), mpfr_log_prec, y, inex));
1292 -
1293 - /* special cases */
1294 -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
1295 -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x) ||
1296 -+ (MPFR_IS_NEG (x) && mpfr_integer_p (x))))
1297 - {
1298 -- if (MPFR_IS_NAN (x) || MPFR_IS_NEG (x))
1299 -+ if (MPFR_IS_NAN (x))
1300 - {
1301 - MPFR_SET_NAN (y);
1302 - MPFR_RET_NAN;
1303 - }
1304 -- else /* lngamma(+Inf) = lngamma(+0) = +Inf */
1305 -+ else /* lngamma(+/-Inf) = lngamma(nonpositive integer) = +Inf */
1306 - {
1307 -- if (MPFR_IS_ZERO (x))
1308 -+ if (!MPFR_IS_INF (x))
1309 - mpfr_set_divby0 ();
1310 - MPFR_SET_INF (y);
1311 - MPFR_SET_POS (y);
1312 -@@ -620,8 +621,8 @@
1313 - }
1314 - }
1315 -
1316 -- /* if x < 0 and -2k-1 <= x <= -2k, then lngamma(x) = NaN */
1317 -- if (MPFR_IS_NEG (x) && (unit_bit (x) == 0 || mpfr_integer_p (x)))
1318 -+ /* if -2k-1 < x < -2k <= 0, then lngamma(x) = NaN */
1319 -+ if (MPFR_IS_NEG (x) && unit_bit (x) == 0)
1320 - {
1321 - MPFR_SET_NAN (y);
1322 - MPFR_RET_NAN;
1323 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
1324 ---- mpfr-3.1.3-a/src/mpfr.h 2015-06-19 19:55:10.000000000 +0000
1325 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
1326 -@@ -27,7 +27,7 @@
1327 - #define MPFR_VERSION_MAJOR 3
1328 - #define MPFR_VERSION_MINOR 1
1329 - #define MPFR_VERSION_PATCHLEVEL 3
1330 --#define MPFR_VERSION_STRING "3.1.3"
1331 -+#define MPFR_VERSION_STRING "3.1.3-p1"
1332 -
1333 - /* Macros dealing with MPFR VERSION */
1334 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
1335 -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
1336 ---- mpfr-3.1.3-a/src/version.c 2015-06-19 19:55:10.000000000 +0000
1337 -+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:49:24.042113845 +0000
1338 -@@ -25,5 +25,5 @@
1339 - const char *
1340 - mpfr_get_version (void)
1341 - {
1342 -- return "3.1.3";
1343 -+ return "3.1.3-p1";
1344 - }
1345 -diff -Naurd mpfr-3.1.3-a/tests/tlngamma.c mpfr-3.1.3-b/tests/tlngamma.c
1346 ---- mpfr-3.1.3-a/tests/tlngamma.c 2015-06-19 19:55:10.000000000 +0000
1347 -+++ mpfr-3.1.3-b/tests/tlngamma.c 2015-07-02 10:49:24.018113593 +0000
1348 -@@ -33,7 +33,7 @@
1349 - special (void)
1350 - {
1351 - mpfr_t x, y;
1352 -- int inex;
1353 -+ int i, inex;
1354 -
1355 - mpfr_init (x);
1356 - mpfr_init (y);
1357 -@@ -46,25 +46,29 @@
1358 - exit (1);
1359 - }
1360 -
1361 -- mpfr_set_inf (x, -1);
1362 -+ mpfr_set_inf (x, 1);
1363 -+ mpfr_clear_flags ();
1364 - mpfr_lngamma (y, x, MPFR_RNDN);
1365 -- if (!mpfr_nan_p (y))
1366 -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
1367 - {
1368 -- printf ("Error for lngamma(-Inf)\n");
1369 -+ printf ("Error for lngamma(+Inf)\n");
1370 - exit (1);
1371 - }
1372 -
1373 -- mpfr_set_inf (x, 1);
1374 -+ mpfr_set_inf (x, -1);
1375 -+ mpfr_clear_flags ();
1376 - mpfr_lngamma (y, x, MPFR_RNDN);
1377 -- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
1378 -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
1379 - {
1380 -- printf ("Error for lngamma(+Inf)\n");
1381 -+ printf ("Error for lngamma(-Inf)\n");
1382 - exit (1);
1383 - }
1384 -
1385 - mpfr_set_ui (x, 0, MPFR_RNDN);
1386 -+ mpfr_clear_flags ();
1387 - mpfr_lngamma (y, x, MPFR_RNDN);
1388 -- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
1389 -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
1390 -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
1391 - {
1392 - printf ("Error for lngamma(+0)\n");
1393 - exit (1);
1394 -@@ -72,32 +76,58 @@
1395 -
1396 - mpfr_set_ui (x, 0, MPFR_RNDN);
1397 - mpfr_neg (x, x, MPFR_RNDN);
1398 -+ mpfr_clear_flags ();
1399 - mpfr_lngamma (y, x, MPFR_RNDN);
1400 -- if (!mpfr_nan_p (y))
1401 -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
1402 -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
1403 - {
1404 - printf ("Error for lngamma(-0)\n");
1405 - exit (1);
1406 - }
1407 -
1408 - mpfr_set_ui (x, 1, MPFR_RNDN);
1409 -+ mpfr_clear_flags ();
1410 - mpfr_lngamma (y, x, MPFR_RNDN);
1411 -- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
1412 -+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
1413 - {
1414 - printf ("Error for lngamma(1)\n");
1415 - exit (1);
1416 - }
1417 -
1418 -- mpfr_set_si (x, -1, MPFR_RNDN);
1419 -- mpfr_lngamma (y, x, MPFR_RNDN);
1420 -- if (!mpfr_nan_p (y))
1421 -+ for (i = 1; i <= 5; i++)
1422 - {
1423 -- printf ("Error for lngamma(-1)\n");
1424 -- exit (1);
1425 -+ int c;
1426 -+
1427 -+ mpfr_set_si (x, -i, MPFR_RNDN);
1428 -+ mpfr_clear_flags ();
1429 -+ mpfr_lngamma (y, x, MPFR_RNDN);
1430 -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
1431 -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
1432 -+ {
1433 -+ printf ("Error for lngamma(-%d)\n", i);
1434 -+ exit (1);
1435 -+ }
1436 -+ if (i & 1)
1437 -+ {
1438 -+ mpfr_nextabove (x);
1439 -+ c = '+';
1440 -+ }
1441 -+ else
1442 -+ {
1443 -+ mpfr_nextbelow (x);
1444 -+ c = '-';
1445 -+ }
1446 -+ mpfr_lngamma (y, x, MPFR_RNDN);
1447 -+ if (!mpfr_nan_p (y))
1448 -+ {
1449 -+ printf ("Error for lngamma(-%d%cepsilon)\n", i, c);
1450 -+ exit (1);
1451 -+ }
1452 - }
1453 -
1454 - mpfr_set_ui (x, 2, MPFR_RNDN);
1455 - mpfr_lngamma (y, x, MPFR_RNDN);
1456 -- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
1457 -+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
1458 - {
1459 - printf ("Error for lngamma(2)\n");
1460 - exit (1);
1461 -@@ -127,7 +157,7 @@
1462 - mpfr_set_str (x, CHECK_X2, 10, MPFR_RNDN);
1463 - mpfr_lngamma (y, x, MPFR_RNDN);
1464 - mpfr_set_str (x, CHECK_Y2, 10, MPFR_RNDN);
1465 -- if (MPFR_IS_NAN (y) || mpfr_cmp (y, x))
1466 -+ if (mpfr_cmp0 (y, x))
1467 - {
1468 - printf ("mpfr_lngamma("CHECK_X2") is wrong:\n"
1469 - "expected ");
1470 -@@ -143,7 +173,7 @@
1471 - mpfr_lngamma (y, x, MPFR_RNDU);
1472 - mpfr_set_prec (x, 175);
1473 - mpfr_set_str_binary (x, "0.1010001100011101101011001101110010100001000001000001110011000001101100001111001001000101011011100100010101011110100111110101010100010011010010000101010111001100011000101111E7");
1474 -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
1475 -+ if (mpfr_cmp0 (x, y))
1476 - {
1477 - printf ("Error in mpfr_lngamma (1)\n");
1478 - exit (1);
1479 -@@ -155,7 +185,7 @@
1480 - mpfr_lngamma (x, y, MPFR_RNDZ);
1481 - mpfr_set_prec (y, 21);
1482 - mpfr_set_str_binary (y, "0.111000101000001100101E9");
1483 -- if (MPFR_IS_NAN (x) || mpfr_cmp (x, y))
1484 -+ if (mpfr_cmp0 (x, y))
1485 - {
1486 - printf ("Error in mpfr_lngamma (120)\n");
1487 - printf ("Expected "); mpfr_print_binary (y); puts ("");
1488 -@@ -169,7 +199,7 @@
1489 - inex = mpfr_lngamma (y, x, MPFR_RNDN);
1490 - mpfr_set_prec (x, 206);
1491 - mpfr_set_str_binary (x, "0.10000111011000000011100010101001100110001110000111100011000100100110110010001011011110101001111011110110000001010100111011010000000011100110110101100111000111010011110010000100010111101010001101000110101001E13");
1492 -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
1493 -+ if (mpfr_cmp0 (x, y))
1494 - {
1495 - printf ("Error in mpfr_lngamma (768)\n");
1496 - exit (1);
1497 -@@ -185,7 +215,7 @@
1498 - mpfr_set_str_binary (x, "0.1100E-66");
1499 - mpfr_lngamma (y, x, MPFR_RNDN);
1500 - mpfr_set_str_binary (x, "0.1100E6");
1501 -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
1502 -+ if (mpfr_cmp0 (x, y))
1503 - {
1504 - printf ("Error for lngamma(0.1100E-66)\n");
1505 - exit (1);
1506 -@@ -199,7 +229,7 @@
1507 - mpfr_lngamma (y, x, MPFR_RNDN);
1508 - mpfr_set_prec (x, 32);
1509 - mpfr_set_str_binary (x, "-0.10001000111011111011000010100010E207");
1510 -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
1511 -+ if (mpfr_cmp0 (x, y))
1512 - {
1513 - printf ("Error for lngamma(-2^199+0.5)\n");
1514 - printf ("Got ");
1515
1516 diff --git a/dev-libs/mpfr/files/3.1.3/patch02 b/dev-libs/mpfr/files/3.1.3/patch02
1517 deleted file mode 100644
1518 index df711fda21e..00000000000
1519 --- a/dev-libs/mpfr/files/3.1.3/patch02
1520 +++ /dev/null
1521 @@ -1,161 +0,0 @@
1522 -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
1523 ---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:50:08.046573308 +0000
1524 -+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:50:08.126574142 +0000
1525 -@@ -0,0 +1 @@
1526 -+muldiv-2exp-overflow
1527 -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
1528 ---- mpfr-3.1.3-a/VERSION 2015-07-02 10:49:24.042113845 +0000
1529 -+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:50:08.126574142 +0000
1530 -@@ -1 +1 @@
1531 --3.1.3-p1
1532 -+3.1.3-p2
1533 -diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
1534 ---- mpfr-3.1.3-a/src/div_2si.c 2015-06-19 19:55:10.000000000 +0000
1535 -+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
1536 -@@ -49,7 +49,7 @@
1537 - rnd_mode = MPFR_RNDZ;
1538 - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
1539 - }
1540 -- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
1541 -+ else if (MPFR_UNLIKELY(n <= 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
1542 - exp > __gmpfr_emax + n)) )
1543 - return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
1544 -
1545 -diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
1546 ---- mpfr-3.1.3-a/src/div_2ui.c 2015-06-19 19:55:10.000000000 +0000
1547 -+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
1548 -@@ -32,7 +32,7 @@
1549 - rnd_mode),
1550 - ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inexact));
1551 -
1552 -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
1553 -+ if (MPFR_UNLIKELY (n == 0 || MPFR_IS_SINGULAR (x)))
1554 - return mpfr_set (y, x, rnd_mode);
1555 - else
1556 - {
1557 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
1558 ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
1559 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
1560 -@@ -27,7 +27,7 @@
1561 - #define MPFR_VERSION_MAJOR 3
1562 - #define MPFR_VERSION_MINOR 1
1563 - #define MPFR_VERSION_PATCHLEVEL 3
1564 --#define MPFR_VERSION_STRING "3.1.3-p1"
1565 -+#define MPFR_VERSION_STRING "3.1.3-p2"
1566 -
1567 - /* Macros dealing with MPFR VERSION */
1568 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
1569 -diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
1570 ---- mpfr-3.1.3-a/src/mul_2si.c 2015-06-19 19:55:10.000000000 +0000
1571 -+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
1572 -@@ -39,7 +39,7 @@
1573 - {
1574 - mpfr_exp_t exp = MPFR_GET_EXP (x);
1575 - MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
1576 -- if (MPFR_UNLIKELY( n > 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
1577 -+ if (MPFR_UNLIKELY(n >= 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
1578 - exp > __gmpfr_emax - n)))
1579 - return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
1580 - else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emin > MPFR_EMAX_MAX + n ||
1581 -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
1582 ---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:49:24.042113845 +0000
1583 -+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:50:08.126574142 +0000
1584 -@@ -25,5 +25,5 @@
1585 - const char *
1586 - mpfr_get_version (void)
1587 - {
1588 -- return "3.1.3-p1";
1589 -+ return "3.1.3-p2";
1590 - }
1591 -diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
1592 ---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-06-19 19:55:10.000000000 +0000
1593 -+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
1594 -@@ -242,6 +242,76 @@
1595 - large (MPFR_EMAX_MAX);
1596 - }
1597 -
1598 -+/* Cases where the function overflows on n = 0 when rounding is like
1599 -+ away from zero. */
1600 -+static void
1601 -+overflow0 (mpfr_exp_t emax)
1602 -+{
1603 -+ mpfr_exp_t old_emax;
1604 -+ mpfr_t x, y1, y2;
1605 -+ int neg, r, op;
1606 -+ static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" };
1607 -+
1608 -+ old_emax = mpfr_get_emax ();
1609 -+ set_emax (emax);
1610 -+
1611 -+ mpfr_init2 (x, 8);
1612 -+ mpfr_inits2 (6, y1, y2, (mpfr_ptr) 0);
1613 -+
1614 -+ mpfr_set_inf (x, 1);
1615 -+ mpfr_nextbelow (x);
1616 -+
1617 -+ for (neg = 0; neg <= 1; neg++)
1618 -+ {
1619 -+ RND_LOOP (r)
1620 -+ {
1621 -+ int inex1, inex2;
1622 -+ unsigned int flags1, flags2;
1623 -+
1624 -+ /* Even if there isn't an overflow (rounding ~ toward zero),
1625 -+ the result is the same as the one of an overflow. */
1626 -+ inex1 = mpfr_overflow (y1, (mpfr_rnd_t) r, neg ? -1 : 1);
1627 -+ flags1 = MPFR_FLAGS_INEXACT;
1628 -+ if (mpfr_inf_p (y1))
1629 -+ flags1 |= MPFR_FLAGS_OVERFLOW;
1630 -+ for (op = 0; op < 4; op++)
1631 -+ {
1632 -+ mpfr_clear_flags ();
1633 -+ inex2 =
1634 -+ op == 0 ? mpfr_mul_2ui (y2, x, 0, (mpfr_rnd_t) r) :
1635 -+ op == 1 ? mpfr_mul_2si (y2, x, 0, (mpfr_rnd_t) r) :
1636 -+ op == 2 ? mpfr_div_2ui (y2, x, 0, (mpfr_rnd_t) r) :
1637 -+ op == 3 ? mpfr_div_2si (y2, x, 0, (mpfr_rnd_t) r) :
1638 -+ (MPFR_ASSERTN (0), 0);
1639 -+ flags2 = __gmpfr_flags;
1640 -+ if (!(mpfr_equal_p (y1, y2) &&
1641 -+ SAME_SIGN (inex1, inex2) &&
1642 -+ flags1 == flags2))
1643 -+ {
1644 -+ printf ("Error in overflow0 for %s, mpfr_%s, emax = %"
1645 -+ MPFR_EXP_FSPEC "d,\nx = ",
1646 -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), sop[op],
1647 -+ (mpfr_eexp_t) emax);
1648 -+ mpfr_dump (x);
1649 -+ printf ("Expected ");
1650 -+ mpfr_dump (y1);
1651 -+ printf (" with inex = %d, flags =", inex1);
1652 -+ flags_out (flags1);
1653 -+ printf ("Got ");
1654 -+ mpfr_dump (y2);
1655 -+ printf (" with inex = %d, flags =", inex2);
1656 -+ flags_out (flags2);
1657 -+ exit (1);
1658 -+ }
1659 -+ }
1660 -+ }
1661 -+ mpfr_neg (x, x, MPFR_RNDN);
1662 -+ }
1663 -+
1664 -+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
1665 -+ set_emax (old_emax);
1666 -+}
1667 -+
1668 - int
1669 - main (int argc, char *argv[])
1670 - {
1671 -@@ -334,6 +404,11 @@
1672 - underflow0 ();
1673 - large0 ();
1674 -
1675 -+ if (mpfr_get_emax () != MPFR_EMAX_MAX)
1676 -+ overflow0 (mpfr_get_emax ());
1677 -+ overflow0 (MPFR_EMAX_MAX);
1678 -+ overflow0 (-1);
1679 -+
1680 - tests_end_mpfr ();
1681 - return 0;
1682 - }
1683
1684 diff --git a/dev-libs/mpfr/files/3.1.3/patch03 b/dev-libs/mpfr/files/3.1.3/patch03
1685 deleted file mode 100644
1686 index c7be09f4aaf..00000000000
1687 --- a/dev-libs/mpfr/files/3.1.3/patch03
1688 +++ /dev/null
1689 @@ -1,217 +0,0 @@
1690 -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
1691 ---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:54:48.592799981 +0000
1692 -+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:54:48.616811495 +0000
1693 -@@ -0,0 +1 @@
1694 -+muldiv-2exp-underflow
1695 -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
1696 ---- mpfr-3.1.3-a/VERSION 2015-07-02 10:50:08.126574142 +0000
1697 -+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:54:48.616811495 +0000
1698 -@@ -1 +1 @@
1699 --3.1.3-p2
1700 -+3.1.3-p3
1701 -diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
1702 ---- mpfr-3.1.3-a/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
1703 -+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-17 08:54:48.608807656 +0000
1704 -@@ -45,7 +45,8 @@
1705 - if (rnd_mode == MPFR_RNDN &&
1706 - (__gmpfr_emin > MPFR_EMAX_MAX - (n - 1) ||
1707 - exp < __gmpfr_emin + (n - 1) ||
1708 -- (inexact >= 0 && mpfr_powerof2_raw (y))))
1709 -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
1710 -+ mpfr_powerof2_raw (y))))
1711 - rnd_mode = MPFR_RNDZ;
1712 - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
1713 - }
1714 -diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
1715 ---- mpfr-3.1.3-a/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
1716 -+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-17 08:54:48.608807656 +0000
1717 -@@ -44,7 +44,9 @@
1718 - if (MPFR_UNLIKELY (n >= diffexp)) /* exp - n <= emin - 1 */
1719 - {
1720 - if (rnd_mode == MPFR_RNDN &&
1721 -- (n > diffexp || (inexact >= 0 && mpfr_powerof2_raw (y))))
1722 -+ (n > diffexp ||
1723 -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
1724 -+ mpfr_powerof2_raw (y))))
1725 - rnd_mode = MPFR_RNDZ;
1726 - return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y));
1727 - }
1728 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
1729 ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
1730 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
1731 -@@ -27,7 +27,7 @@
1732 - #define MPFR_VERSION_MAJOR 3
1733 - #define MPFR_VERSION_MINOR 1
1734 - #define MPFR_VERSION_PATCHLEVEL 3
1735 --#define MPFR_VERSION_STRING "3.1.3-p2"
1736 -+#define MPFR_VERSION_STRING "3.1.3-p3"
1737 -
1738 - /* Macros dealing with MPFR VERSION */
1739 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
1740 -diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
1741 ---- mpfr-3.1.3-a/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
1742 -+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-17 08:54:48.608807656 +0000
1743 -@@ -48,7 +48,8 @@
1744 - if (rnd_mode == MPFR_RNDN &&
1745 - (__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) ||
1746 - exp < __gmpfr_emin - (n + 1) ||
1747 -- (inexact >= 0 && mpfr_powerof2_raw (y))))
1748 -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
1749 -+ mpfr_powerof2_raw (y))))
1750 - rnd_mode = MPFR_RNDZ;
1751 - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
1752 - }
1753 -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
1754 ---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:50:08.126574142 +0000
1755 -+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:54:48.616811495 +0000
1756 -@@ -25,5 +25,5 @@
1757 - const char *
1758 - mpfr_get_version (void)
1759 - {
1760 -- return "3.1.3-p2";
1761 -+ return "3.1.3-p3";
1762 - }
1763 -diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
1764 ---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
1765 -+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-17 08:54:48.608807656 +0000
1766 -@@ -50,77 +50,82 @@
1767 - {
1768 - mpfr_t x, y, z1, z2;
1769 - mpfr_exp_t emin;
1770 -- int i, k;
1771 -+ int i, k, s;
1772 - int prec;
1773 - int rnd;
1774 - int div;
1775 - int inex1, inex2;
1776 - unsigned int flags1, flags2;
1777 -
1778 -- /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e)
1779 -- * with emin = e, x = 1 + i/16, i in { -1, 0, 1 }, and k = 1 to 4,
1780 -- * by comparing the result with the one of a simple division.
1781 -+ /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e) with
1782 -+ * emin = e, x = s * (1 + i/16), i in { -1, 0, 1 }, s in { -1, 1 }, and
1783 -+ * k = 1 to 4, by comparing the result with the one of a simple division.
1784 - */
1785 - emin = mpfr_get_emin ();
1786 - set_emin (e);
1787 - mpfr_inits2 (8, x, y, (mpfr_ptr) 0);
1788 - for (i = 15; i <= 17; i++)
1789 -- {
1790 -- inex1 = mpfr_set_ui_2exp (x, i, -4, MPFR_RNDN);
1791 -- MPFR_ASSERTN (inex1 == 0);
1792 -- for (prec = 6; prec >= 3; prec -= 3)
1793 -- {
1794 -- mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
1795 -- RND_LOOP (rnd)
1796 -- for (k = 1; k <= 4; k++)
1797 -- {
1798 -- /* The following one is assumed to be correct. */
1799 -- inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
1800 -- MPFR_ASSERTN (inex1 == 0);
1801 -- inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
1802 -- MPFR_ASSERTN (inex1 == 0);
1803 -- mpfr_clear_flags ();
1804 -- /* Do not use mpfr_div_ui to avoid the optimization
1805 -- by mpfr_div_2si. */
1806 -- inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
1807 -- flags1 = __gmpfr_flags;
1808 --
1809 -- for (div = 0; div <= 2; div++)
1810 -+ for (s = 1; s >= -1; s -= 2)
1811 -+ {
1812 -+ inex1 = mpfr_set_si_2exp (x, s * i, -4, MPFR_RNDN);
1813 -+ MPFR_ASSERTN (inex1 == 0);
1814 -+ for (prec = 6; prec >= 3; prec -= 3)
1815 -+ {
1816 -+ mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
1817 -+ RND_LOOP (rnd)
1818 -+ for (k = 1; k <= 4; k++)
1819 - {
1820 -+ /* The following one is assumed to be correct. */
1821 -+ inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
1822 -+ MPFR_ASSERTN (inex1 == 0);
1823 -+ inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
1824 -+ MPFR_ASSERTN (inex1 == 0);
1825 - mpfr_clear_flags ();
1826 -- inex2 = div == 0 ?
1827 -- mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : div == 1 ?
1828 -- mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
1829 -- mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
1830 -- flags2 = __gmpfr_flags;
1831 -- if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
1832 -- mpfr_equal_p (z1, z2))
1833 -- continue;
1834 -- printf ("Error in underflow(");
1835 -- if (e == MPFR_EMIN_MIN)
1836 -- printf ("MPFR_EMIN_MIN");
1837 -- else if (e == emin)
1838 -- printf ("default emin");
1839 -- else if (e >= LONG_MIN)
1840 -- printf ("%ld", (long) e);
1841 -- else
1842 -- printf ("<LONG_MIN");
1843 -- printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d, "
1844 -- "%s\n", div == 0 ? "mul_2si" : div == 1 ?
1845 -- "div_2si" : "div_2ui", i, prec, k,
1846 -- mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
1847 -- printf ("Expected ");
1848 -- mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
1849 -- printf (", inex = %d, flags = %u\n", SIGN (inex1), flags1);
1850 -- printf ("Got ");
1851 -- mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
1852 -- printf (", inex = %d, flags = %u\n", SIGN (inex2), flags2);
1853 -- exit (1);
1854 -- } /* div */
1855 -- } /* k */
1856 -- mpfr_clears (z1, z2, (mpfr_ptr) 0);
1857 -- } /* prec */
1858 -- } /* i */
1859 -+ /* Do not use mpfr_div_ui to avoid the optimization
1860 -+ by mpfr_div_2si. */
1861 -+ inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
1862 -+ flags1 = __gmpfr_flags;
1863 -+
1864 -+ for (div = 0; div <= 2; div++)
1865 -+ {
1866 -+ mpfr_clear_flags ();
1867 -+ inex2 =
1868 -+ div == 0 ?
1869 -+ mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) :
1870 -+ div == 1 ?
1871 -+ mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
1872 -+ mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
1873 -+ flags2 = __gmpfr_flags;
1874 -+ if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
1875 -+ mpfr_equal_p (z1, z2))
1876 -+ continue;
1877 -+ printf ("Error in underflow(");
1878 -+ if (e == MPFR_EMIN_MIN)
1879 -+ printf ("MPFR_EMIN_MIN");
1880 -+ else if (e == emin)
1881 -+ printf ("default emin");
1882 -+ else if (e >= LONG_MIN)
1883 -+ printf ("%ld", (long) e);
1884 -+ else
1885 -+ printf ("<LONG_MIN");
1886 -+ printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d,"
1887 -+ " %s\n", div == 0 ? "mul_2si" : div == 1 ?
1888 -+ "div_2si" : "div_2ui", s * i, prec, k,
1889 -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
1890 -+ printf ("Expected ");
1891 -+ mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
1892 -+ printf (", inex = %d, flags = %u\n",
1893 -+ SIGN (inex1), flags1);
1894 -+ printf ("Got ");
1895 -+ mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
1896 -+ printf (", inex = %d, flags = %u\n",
1897 -+ SIGN (inex2), flags2);
1898 -+ exit (1);
1899 -+ } /* div */
1900 -+ } /* k */
1901 -+ mpfr_clears (z1, z2, (mpfr_ptr) 0);
1902 -+ } /* prec */
1903 -+ } /* i */
1904 - mpfr_clears (x, y, (mpfr_ptr) 0);
1905 - set_emin (emin);
1906 - }
1907
1908 diff --git a/dev-libs/mpfr/files/3.1.3/patch04 b/dev-libs/mpfr/files/3.1.3/patch04
1909 deleted file mode 100644
1910 index e0d5e09bc13..00000000000
1911 --- a/dev-libs/mpfr/files/3.1.3/patch04
1912 +++ /dev/null
1913 @@ -1,204 +0,0 @@
1914 -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
1915 ---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:58:21.094987384 +0000
1916 -+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:58:21.118986898 +0000
1917 -@@ -0,0 +1 @@
1918 -+frexp
1919 -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
1920 ---- mpfr-3.1.3-a/VERSION 2015-07-17 08:54:48.616811495 +0000
1921 -+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:58:21.118986898 +0000
1922 -@@ -1 +1 @@
1923 --3.1.3-p3
1924 -+3.1.3-p4
1925 -diff -Naurd mpfr-3.1.3-a/src/frexp.c mpfr-3.1.3-b/src/frexp.c
1926 ---- mpfr-3.1.3-a/src/frexp.c 2015-06-19 19:55:09.000000000 +0000
1927 -+++ mpfr-3.1.3-b/src/frexp.c 2015-07-17 08:58:21.106987142 +0000
1928 -@@ -26,6 +26,13 @@
1929 - mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
1930 - {
1931 - int inex;
1932 -+ unsigned int saved_flags = __gmpfr_flags;
1933 -+ MPFR_BLOCK_DECL (flags);
1934 -+
1935 -+ MPFR_LOG_FUNC
1936 -+ (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec (x), mpfr_log_prec, x, rnd),
1937 -+ ("y[%Pu]=%.*Rg exp=%" MPFR_EXP_FSPEC "d inex=%d", mpfr_get_prec (y),
1938 -+ mpfr_log_prec, y, (mpfr_eexp_t) *exp, inex));
1939 -
1940 - if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)))
1941 - {
1942 -@@ -49,8 +56,32 @@
1943 - }
1944 - }
1945 -
1946 -- inex = mpfr_set (y, x, rnd);
1947 -+ MPFR_BLOCK (flags, inex = mpfr_set (y, x, rnd));
1948 -+ __gmpfr_flags = saved_flags;
1949 -+
1950 -+ /* Possible overflow due to the rounding, no possible underflow. */
1951 -+
1952 -+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags)))
1953 -+ {
1954 -+ int inex2;
1955 -+
1956 -+ /* An overflow here means that the exponent of y would be larger than
1957 -+ the one of x, thus x would be rounded to the next power of 2, and
1958 -+ the returned y should be 1/2 in absolute value, rounded (i.e. with
1959 -+ possible underflow or overflow). This also implies that x and y are
1960 -+ different objects, so that the exponent of x has not been lost. */
1961 -+ MPFR_LOG_MSG (("Internal overflow\n", 0));
1962 -+ MPFR_ASSERTD (x != y);
1963 -+ *exp = MPFR_GET_EXP (x) + 1;
1964 -+ inex2 = mpfr_set_si_2exp (y, MPFR_INT_SIGN (x), -1, rnd);
1965 -+ MPFR_LOG_MSG (("inex=%d inex2=%d\n", inex, inex2));
1966 -+ if (inex2 != 0)
1967 -+ inex = inex2;
1968 -+ MPFR_RET (inex);
1969 -+ }
1970 -+
1971 - *exp = MPFR_GET_EXP (y);
1972 -- MPFR_SET_EXP (y, 0);
1973 -+ /* Do not use MPFR_SET_EXP because the range has not been checked yet. */
1974 -+ MPFR_EXP (y) = 0;
1975 - return mpfr_check_range (y, inex, rnd);
1976 - }
1977 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
1978 ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
1979 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000
1980 -@@ -27,7 +27,7 @@
1981 - #define MPFR_VERSION_MAJOR 3
1982 - #define MPFR_VERSION_MINOR 1
1983 - #define MPFR_VERSION_PATCHLEVEL 3
1984 --#define MPFR_VERSION_STRING "3.1.3-p3"
1985 -+#define MPFR_VERSION_STRING "3.1.3-p4"
1986 -
1987 - /* Macros dealing with MPFR VERSION */
1988 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
1989 -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
1990 ---- mpfr-3.1.3-a/src/version.c 2015-07-17 08:54:48.616811495 +0000
1991 -+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:58:21.118986898 +0000
1992 -@@ -25,5 +25,5 @@
1993 - const char *
1994 - mpfr_get_version (void)
1995 - {
1996 -- return "3.1.3-p3";
1997 -+ return "3.1.3-p4";
1998 - }
1999 -diff -Naurd mpfr-3.1.3-a/tests/tfrexp.c mpfr-3.1.3-b/tests/tfrexp.c
2000 ---- mpfr-3.1.3-a/tests/tfrexp.c 2015-06-19 19:55:10.000000000 +0000
2001 -+++ mpfr-3.1.3-b/tests/tfrexp.c 2015-07-17 08:58:21.106987142 +0000
2002 -@@ -129,12 +129,115 @@
2003 - mpfr_clear (x);
2004 - }
2005 -
2006 -+static void check1 (void)
2007 -+{
2008 -+ mpfr_exp_t emin, emax, e;
2009 -+ mpfr_t x, y1, y2;
2010 -+ int r, neg, red;
2011 -+
2012 -+ emin = mpfr_get_emin ();
2013 -+ emax = mpfr_get_emax ();
2014 -+ set_emin (MPFR_EMIN_MIN);
2015 -+ set_emax (MPFR_EMAX_MAX);
2016 -+
2017 -+ mpfr_init2 (x, 7);
2018 -+ mpfr_inits2 (4, y1, y2, (mpfr_ptr) 0);
2019 -+
2020 -+ mpfr_set_ui_2exp (x, 1, -2, MPFR_RNDN);
2021 -+ while (mpfr_regular_p (x))
2022 -+ {
2023 -+ /* Test the exponents up to 3 and with the maximum exponent
2024 -+ (to check potential intermediate overflow). */
2025 -+ if (MPFR_GET_EXP (x) == 4)
2026 -+ mpfr_set_exp (x, MPFR_EMAX_MAX);
2027 -+ e = MPFR_GET_EXP (x);
2028 -+ for (neg = 0; neg < 2; neg++)
2029 -+ {
2030 -+ RND_LOOP (r)
2031 -+ {
2032 -+ int inex1, inex2;
2033 -+ mpfr_exp_t e1, e2;
2034 -+ unsigned int flags1, flags2;
2035 -+
2036 -+ for (red = 0; red < 2; red++)
2037 -+ {
2038 -+ if (red)
2039 -+ {
2040 -+ /* e1: exponent of the rounded value of x. */
2041 -+ MPFR_ASSERTN (e1 == e || e1 == e + 1);
2042 -+ set_emin (e);
2043 -+ set_emax (e);
2044 -+ mpfr_clear_flags ();
2045 -+ inex1 = e1 < 0 ?
2046 -+ mpfr_mul_2ui (y1, x, -e1, (mpfr_rnd_t) r) :
2047 -+ mpfr_div_2ui (y1, x, e1, (mpfr_rnd_t) r);
2048 -+ flags1 = __gmpfr_flags;
2049 -+ }
2050 -+ else
2051 -+ {
2052 -+ inex1 = mpfr_set (y1, x, (mpfr_rnd_t) r);
2053 -+ e1 = MPFR_IS_INF (y1) ? e + 1 : MPFR_GET_EXP (y1);
2054 -+ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0;
2055 -+ }
2056 -+ mpfr_clear_flags ();
2057 -+ inex2 = mpfr_frexp (&e2, y2, x, (mpfr_rnd_t) r);
2058 -+ flags2 = __gmpfr_flags;
2059 -+ set_emin (MPFR_EMIN_MIN);
2060 -+ set_emax (MPFR_EMAX_MAX);
2061 -+ if ((!red || e == 0) &&
2062 -+ (! mpfr_regular_p (y2) || MPFR_GET_EXP (y2) != 0))
2063 -+ {
2064 -+ printf ("Error in check1 for %s, red = %d, x = ",
2065 -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
2066 -+ mpfr_dump (x);
2067 -+ printf ("Expected 1/2 <= |y| < 1, got y = ");
2068 -+ mpfr_dump (y2);
2069 -+ exit (1);
2070 -+ }
2071 -+ if (!red)
2072 -+ {
2073 -+ if (e2 > 0)
2074 -+ mpfr_mul_2ui (y2, y2, e2, MPFR_RNDN);
2075 -+ else if (e2 < 0)
2076 -+ mpfr_div_2ui (y2, y2, -e2, MPFR_RNDN);
2077 -+ }
2078 -+ if (! (SAME_SIGN (inex1, inex2) &&
2079 -+ mpfr_equal_p (y1, y2) &&
2080 -+ flags1 == flags2))
2081 -+ {
2082 -+ printf ("Error in check1 for %s, red = %d, x = ",
2083 -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
2084 -+ mpfr_dump (x);
2085 -+ printf ("Expected y1 = ");
2086 -+ mpfr_dump (y1);
2087 -+ printf ("Got y2 = ");
2088 -+ mpfr_dump (y2);
2089 -+ printf ("Expected inex ~= %d, got %d\n", inex1, inex2);
2090 -+ printf ("Expected flags:");
2091 -+ flags_out (flags1);
2092 -+ printf ("Got flags: ");
2093 -+ flags_out (flags2);
2094 -+ exit (1);
2095 -+ }
2096 -+ }
2097 -+ }
2098 -+ mpfr_neg (x, x, MPFR_RNDN);
2099 -+ }
2100 -+ mpfr_nextabove (x);
2101 -+ }
2102 -+
2103 -+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
2104 -+ set_emin (emin);
2105 -+ set_emax (emax);
2106 -+}
2107 -+
2108 - int
2109 - main (int argc, char *argv[])
2110 - {
2111 - tests_start_mpfr ();
2112 -
2113 - check_special ();
2114 -+ check1 ();
2115 -
2116 - tests_end_mpfr ();
2117 - return 0;
2118
2119 diff --git a/dev-libs/mpfr/files/3.1.5/patch01 b/dev-libs/mpfr/files/3.1.5/patch01
2120 deleted file mode 100644
2121 index e1576d59766..00000000000
2122 --- a/dev-libs/mpfr/files/3.1.5/patch01
2123 +++ /dev/null
2124 @@ -1,82 +0,0 @@
2125 -diff -Naurd mpfr-3.1.5-a/PATCHES mpfr-3.1.5-b/PATCHES
2126 ---- mpfr-3.1.5-a/PATCHES 2016-12-15 08:35:46.476430238 +0000
2127 -+++ mpfr-3.1.5-b/PATCHES 2016-12-15 08:35:46.544430346 +0000
2128 -@@ -0,0 +1 @@
2129 -+vasprintf
2130 -diff -Naurd mpfr-3.1.5-a/VERSION mpfr-3.1.5-b/VERSION
2131 ---- mpfr-3.1.5-a/VERSION 2016-09-27 07:58:14.000000000 +0000
2132 -+++ mpfr-3.1.5-b/VERSION 2016-12-15 08:35:46.544430346 +0000
2133 -@@ -1 +1 @@
2134 --3.1.5
2135 -+3.1.5-p1
2136 -diff -Naurd mpfr-3.1.5-a/src/mpfr.h mpfr-3.1.5-b/src/mpfr.h
2137 ---- mpfr-3.1.5-a/src/mpfr.h 2016-09-27 07:58:15.000000000 +0000
2138 -+++ mpfr-3.1.5-b/src/mpfr.h 2016-12-15 08:35:46.540430340 +0000
2139 -@@ -27,7 +27,7 @@
2140 - #define MPFR_VERSION_MAJOR 3
2141 - #define MPFR_VERSION_MINOR 1
2142 - #define MPFR_VERSION_PATCHLEVEL 5
2143 --#define MPFR_VERSION_STRING "3.1.5"
2144 -+#define MPFR_VERSION_STRING "3.1.5-p1"
2145 -
2146 - /* Macros dealing with MPFR VERSION */
2147 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
2148 -diff -Naurd mpfr-3.1.5-a/src/vasprintf.c mpfr-3.1.5-b/src/vasprintf.c
2149 ---- mpfr-3.1.5-a/src/vasprintf.c 2016-09-27 07:58:15.000000000 +0000
2150 -+++ mpfr-3.1.5-b/src/vasprintf.c 2016-12-15 08:35:46.520430308 +0000
2151 -@@ -1593,7 +1593,7 @@
2152 - }
2153 - else if (spec.spec == 'f' || spec.spec == 'F')
2154 - {
2155 -- if (spec.prec == -1)
2156 -+ if (spec.prec < 0)
2157 - spec.prec = 6;
2158 - if (regular_fg (np, p, spec, NULL) == -1)
2159 - goto error;
2160 -diff -Naurd mpfr-3.1.5-a/src/version.c mpfr-3.1.5-b/src/version.c
2161 ---- mpfr-3.1.5-a/src/version.c 2016-09-27 07:58:15.000000000 +0000
2162 -+++ mpfr-3.1.5-b/src/version.c 2016-12-15 08:35:46.544430346 +0000
2163 -@@ -25,5 +25,5 @@
2164 - const char *
2165 - mpfr_get_version (void)
2166 - {
2167 -- return "3.1.5";
2168 -+ return "3.1.5-p1";
2169 - }
2170 -diff -Naurd mpfr-3.1.5-a/tests/tsprintf.c mpfr-3.1.5-b/tests/tsprintf.c
2171 ---- mpfr-3.1.5-a/tests/tsprintf.c 2016-09-27 07:58:14.000000000 +0000
2172 -+++ mpfr-3.1.5-b/tests/tsprintf.c 2016-12-15 08:35:46.520430308 +0000
2173 -@@ -1251,6 +1251,25 @@
2174 - check_emin_aux (MPFR_EMIN_MIN);
2175 - }
2176 -
2177 -+static void
2178 -+test20161214 (void)
2179 -+{
2180 -+ mpfr_t x;
2181 -+ char buf[32];
2182 -+ const char s[] = "0x0.fffffffffffff8p+1024";
2183 -+ int r;
2184 -+
2185 -+ mpfr_init2 (x, 64);
2186 -+ mpfr_set_str (x, s, 16, MPFR_RNDN);
2187 -+ r = mpfr_snprintf (buf, 32, "%.*RDf", -2, x);
2188 -+ MPFR_ASSERTN(r == 316);
2189 -+ r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN + 1, x);
2190 -+ MPFR_ASSERTN(r == 316);
2191 -+ r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN, x);
2192 -+ MPFR_ASSERTN(r == 316);
2193 -+ mpfr_clear (x);
2194 -+}
2195 -+
2196 - int
2197 - main (int argc, char **argv)
2198 - {
2199 -@@ -1271,6 +1290,7 @@
2200 - mixed ();
2201 - check_emax ();
2202 - check_emin ();
2203 -+ test20161214 ();
2204 -
2205 - #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
2206 - #if MPFR_LCONV_DPTS
2207
2208 diff --git a/dev-libs/mpfr/files/3.1.5/patch02 b/dev-libs/mpfr/files/3.1.5/patch02
2209 deleted file mode 100644
2210 index 01878bf1b0d..00000000000
2211 --- a/dev-libs/mpfr/files/3.1.5/patch02
2212 +++ /dev/null
2213 @@ -1,92 +0,0 @@
2214 -diff -Naurd mpfr-3.1.5-a/PATCHES mpfr-3.1.5-b/PATCHES
2215 ---- mpfr-3.1.5-a/PATCHES 2016-12-19 22:11:17.022676737 +0000
2216 -+++ mpfr-3.1.5-b/PATCHES 2016-12-19 22:11:17.094676820 +0000
2217 -@@ -0,0 +1 @@
2218 -+strtofr
2219 -diff -Naurd mpfr-3.1.5-a/VERSION mpfr-3.1.5-b/VERSION
2220 ---- mpfr-3.1.5-a/VERSION 2016-12-15 08:35:46.544430346 +0000
2221 -+++ mpfr-3.1.5-b/VERSION 2016-12-19 22:11:17.094676820 +0000
2222 -@@ -1 +1 @@
2223 --3.1.5-p1
2224 -+3.1.5-p2
2225 -diff -Naurd mpfr-3.1.5-a/src/mpfr.h mpfr-3.1.5-b/src/mpfr.h
2226 ---- mpfr-3.1.5-a/src/mpfr.h 2016-12-15 08:35:46.540430340 +0000
2227 -+++ mpfr-3.1.5-b/src/mpfr.h 2016-12-19 22:11:17.090676815 +0000
2228 -@@ -27,7 +27,7 @@
2229 - #define MPFR_VERSION_MAJOR 3
2230 - #define MPFR_VERSION_MINOR 1
2231 - #define MPFR_VERSION_PATCHLEVEL 5
2232 --#define MPFR_VERSION_STRING "3.1.5-p1"
2233 -+#define MPFR_VERSION_STRING "3.1.5-p2"
2234 -
2235 - /* Macros dealing with MPFR VERSION */
2236 - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
2237 -diff -Naurd mpfr-3.1.5-a/src/strtofr.c mpfr-3.1.5-b/src/strtofr.c
2238 ---- mpfr-3.1.5-a/src/strtofr.c 2016-09-27 07:58:15.000000000 +0000
2239 -+++ mpfr-3.1.5-b/src/strtofr.c 2016-12-19 22:11:17.066676788 +0000
2240 -@@ -743,11 +743,14 @@
2241 - of the pstr_size most significant digits of pstr->mant, with
2242 - equality in case exact is non-zero. */
2243 -
2244 -- /* test if rounding is possible, and if so exit the loop */
2245 -- if (exact || mpfr_can_round_raw (result, ysize,
2246 -- (pstr->negative) ? -1 : 1,
2247 -- ysize_bits - err - 1,
2248 -- MPFR_RNDN, rnd, MPFR_PREC(x)))
2249 -+ /* test if rounding is possible, and if so exit the loop.
2250 -+ Note: we also need to be able to determine the correct ternary value,
2251 -+ thus we use the MPFR_PREC(x) + (rnd == MPFR_RNDN) trick.
2252 -+ For example if result = xxx...xxx111...111 and rnd = RNDN,
2253 -+ then we know the correct rounding is xxx...xx(x+1), but we cannot know
2254 -+ the correct ternary value. */
2255 -+ if (exact || mpfr_round_p (result, ysize, ysize_bits - err - 1,
2256 -+ MPFR_PREC(x) + (rnd == MPFR_RNDN)))
2257 - break;
2258 -
2259 - next_loop:
2260 -diff -Naurd mpfr-3.1.5-a/src/version.c mpfr-3.1.5-b/src/version.c
2261 ---- mpfr-3.1.5-a/src/version.c 2016-12-15 08:35:46.544430346 +0000
2262 -+++ mpfr-3.1.5-b/src/version.c 2016-12-19 22:11:17.094676820 +0000
2263 -@@ -25,5 +25,5 @@
2264 - const char *
2265 - mpfr_get_version (void)
2266 - {
2267 -- return "3.1.5-p1";
2268 -+ return "3.1.5-p2";
2269 - }
2270 -diff -Naurd mpfr-3.1.5-a/tests/tstrtofr.c mpfr-3.1.5-b/tests/tstrtofr.c
2271 ---- mpfr-3.1.5-a/tests/tstrtofr.c 2016-09-27 07:58:14.000000000 +0000
2272 -+++ mpfr-3.1.5-b/tests/tstrtofr.c 2016-12-19 22:11:17.066676788 +0000
2273 -@@ -1191,6 +1191,24 @@
2274 - mpfr_clears (e, x1, x2, (mpfr_ptr) 0);
2275 - }
2276 -
2277 -+/* Note: the number is 5^47/2^9. */
2278 -+static void
2279 -+bug20161217 (void)
2280 -+{
2281 -+ mpfr_t fp, z;
2282 -+ static const char * num = "0.1387778780781445675529539585113525390625e31";
2283 -+ int inex;
2284 -+
2285 -+ mpfr_init2 (fp, 110);
2286 -+ mpfr_init2 (z, 110);
2287 -+ inex = mpfr_strtofr (fp, num, NULL, 10, MPFR_RNDN);
2288 -+ MPFR_ASSERTN(inex == 0);
2289 -+ mpfr_set_str_binary (z, "10001100001000010011110110011101101001010000001011011110010001010100010100100110111101000010001011001100001101E-9");
2290 -+ MPFR_ASSERTN(mpfr_equal_p (fp, z));
2291 -+ mpfr_clear (fp);
2292 -+ mpfr_clear (z);
2293 -+}
2294 -+
2295 - int
2296 - main (int argc, char *argv[])
2297 - {
2298 -@@ -1205,6 +1223,7 @@
2299 - test20100310 ();
2300 - bug20120814 ();
2301 - bug20120829 ();
2302 -+ bug20161217 ();
2303 -
2304 - tests_end_mpfr ();
2305 - return 0;
2306
2307 diff --git a/dev-libs/mpfr/mpfr-2.4.2_p3-r1.ebuild b/dev-libs/mpfr/mpfr-2.4.2_p3-r1.ebuild
2308 index 556230ad391..74ef62bbfba 100644
2309 --- a/dev-libs/mpfr/mpfr-2.4.2_p3-r1.ebuild
2310 +++ b/dev-libs/mpfr/mpfr-2.4.2_p3-r1.ebuild
2311 @@ -11,7 +11,8 @@ MY_PV=${PV/_p*}
2312 MY_P=${PN}-${MY_PV}
2313 DESCRIPTION="library for multiple-precision floating-point computations with exact rounding"
2314 HOMEPAGE="http://www.mpfr.org/"
2315 -SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.bz2"
2316 +SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.bz2
2317 + https://dev.gentoo.org/~mgorny/dist/${MY_P}-patchset.tar.bz2"
2318
2319 LICENSE="LGPL-2.1"
2320 SLOT="1"
2321 @@ -24,7 +25,7 @@ DEPEND="${RDEPEND}"
2322 S=${WORKDIR}/${MY_P}
2323
2324 src_prepare() {
2325 - epatch "${FILESDIR}"/${MY_PV}/patch*
2326 + epatch "${WORKDIR}"/${MY_P}-patchset/patch*
2327 sed -i '/if test/s:==:=:' configure #261016
2328 find . -type f -exec touch -r configure {} +
2329 elibtoolize
2330
2331 diff --git a/dev-libs/mpfr/mpfr-3.1.3_p4.ebuild b/dev-libs/mpfr/mpfr-3.1.3_p4.ebuild
2332 index dd9e659c960..6ebbbdfc51c 100644
2333 --- a/dev-libs/mpfr/mpfr-3.1.3_p4.ebuild
2334 +++ b/dev-libs/mpfr/mpfr-3.1.3_p4.ebuild
2335 @@ -11,7 +11,8 @@ MY_P=${PN}-${MY_PV}
2336 PLEVEL=${PV/*p}
2337 DESCRIPTION="library for multiple-precision floating-point computations with exact rounding"
2338 HOMEPAGE="http://www.mpfr.org/"
2339 -SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz"
2340 +SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz
2341 + https://dev.gentoo.org/~mgorny/dist/${MY_P}-patchset.tar.xz"
2342
2343 LICENSE="LGPL-2.1"
2344 SLOT="0"
2345 @@ -27,7 +28,7 @@ src_prepare() {
2346 if [[ ${PLEVEL} != ${PV} ]] ; then
2347 local i
2348 for (( i = 1; i <= PLEVEL; ++i )) ; do
2349 - epatch "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i})
2350 + epatch "${WORKDIR}"/${MY_P}-patchset/patch$(printf '%02d' ${i})
2351 done
2352 fi
2353 find . -type f -exec touch -r configure {} +
2354
2355 diff --git a/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild b/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild
2356 index 46d667649b5..60a12e83e3e 100644
2357 --- a/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild
2358 +++ b/dev-libs/mpfr/mpfr-3.1.5_p2.ebuild
2359 @@ -11,7 +11,8 @@ MY_P=${PN}-${MY_PV}
2360 PLEVEL=${PV/*p}
2361 DESCRIPTION="library for multiple-precision floating-point computations with exact rounding"
2362 HOMEPAGE="http://www.mpfr.org/"
2363 -SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz"
2364 +SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz
2365 + https://dev.gentoo.org/~mgorny/dist/${MY_P}-patchset.tar.xz"
2366
2367 LICENSE="LGPL-2.1"
2368 SLOT="0/4" # libmpfr.so version
2369 @@ -27,7 +28,7 @@ src_prepare() {
2370 if [[ ${PLEVEL} != ${PV} ]] ; then
2371 local i
2372 for (( i = 1; i <= PLEVEL; ++i )) ; do
2373 - epatch "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i})
2374 + epatch "${WORKDIR}"/${MY_P}-patchset/patch$(printf '%02d' ${i})
2375 done
2376 fi
2377 epatch_user