···33stdenv.mkDerivation rec {
44 name = "libc++-${version}";
5566- src = fetch "libcxx" "1yf0ns4cvvirp1ml5a8h29lysnw5c23715b09x68v5zkxhxnap2s";
66+ src = fetch "libcxx" "10cbgi1nfksjrlgvbsx8pkcqxsgkszdqy5cj2zgwj2c2yi9d9wsj";
7788 # instead of allowing libc++ to link with /usr/lib/libc++abi.dylib,
99 # force it to link with our copy
···11-diff --git a/src/loader/loader.c b/src/loader/loader.c
22-index 666d015..4d7a9be 100644
11+diff --git a/loader.c b/loader.c
22+index 4fdf3c2..69ea22d 100644
33--- a/src/loader/loader.c
44+++ b/src/loader/loader.c
55-@@ -101,7 +101,7 @@ static void *
55+@@ -112,7 +112,7 @@ static void *udev_handle = NULL;
66+ static void *
67 udev_dlopen_handle(void)
78 {
88- if (!udev_handle) {
99-- udev_handle = dlopen("libudev.so.1", RTLD_LOCAL | RTLD_LAZY);
1010-+ udev_handle = dlopen("@udev@/lib/libudev.so.1", RTLD_LOCAL | RTLD_LAZY);
99+- char name[80];
1010++ char name[256];
1111+ unsigned flags = RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY;
1212+ int version;
11131212- if (!udev_handle) {
1313- /* libudev.so.1 changed the return types of the two unref functions
1414+@@ -126,7 +126,7 @@ udev_dlopen_handle(void)
1515+ /* First try opening an already linked libudev, then try loading one */
1616+ do {
1717+ for (version = 1; version >= 0; version--) {
1818+- snprintf(name, sizeof(name), "libudev.so.%d", version);
1919++ snprintf(name, sizeof(name), "@udev@/lib/libudev.so.%d", version);
2020+ udev_handle = dlopen(name, flags);
2121+ if (udev_handle)
2222+ return udev_handle;
+4-11
pkgs/development/libraries/mpfr/default.nix
···11{ stdenv, fetchurl, gmp }:
2233stdenv.mkDerivation rec {
44- name = "mpfr-3.1.2";
44+ name = "mpfr-3.1.3";
5566 src = fetchurl {
77 url = "mirror://gnu/mpfr/${name}.tar.bz2";
88- sha256 = "0sqvpfkzamxdr87anzakf9dhkfh15lfmm5bsqajk02h1mxh3zivr";
88+ sha256 = "1z8akfw9wbmq91vrx04bw86mmnxw2sw5qm5cr8ix5b3w2mcv8fzn";
99 };
10101111+ patches = [ ./upstream.patch ];
1212+1113 # mpfr.h requires gmp.h
1214 propagatedBuildInputs = [ gmp ];
13151414- CFLAGS = "-I${gmp}/include";
1515- LDFLAGS = if stdenv.isDarwin then "-L${gmp}/lib" else null;
1616-1716 configureFlags =
1818- /* Work around a FreeBSD bug that otherwise leads to segfaults in the test suite:
1919- http://hydra.bordeaux.inria.fr/build/34862
2020- http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00015.html
2121- http://www.freebsd.org/cgi/query-pr.cgi?pr=161344
2222- */
2323- stdenv.lib.optional (stdenv.isSunOS or stdenv.isFreeBSD) "--disable-thread-safe" ++
2417 stdenv.lib.optional stdenv.is64bit "--with-pic";
25182619 doCheck = true;
+1699
pkgs/development/libraries/mpfr/upstream.patch
···11+diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
22+--- mpfr-3.1.3-a/PATCHES 2015-07-02 10:49:23.950112879 +0000
33++++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:49:24.042113845 +0000
44+@@ -0,0 +1 @@
55++lngamma-and-doc
66+diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
77+--- mpfr-3.1.3-a/VERSION 2015-06-19 19:55:09.000000000 +0000
88++++ mpfr-3.1.3-b/VERSION 2015-07-02 10:49:24.042113845 +0000
99+@@ -1 +1 @@
1010+-3.1.3
1111++3.1.3-p1
1212+diff -Naurd mpfr-3.1.3-a/doc/mpfr.texi mpfr-3.1.3-b/doc/mpfr.texi
1313+--- mpfr-3.1.3-a/doc/mpfr.texi 2015-06-19 19:55:11.000000000 +0000
1414++++ mpfr-3.1.3-b/doc/mpfr.texi 2015-07-02 10:49:24.018113593 +0000
1515+@@ -810,13 +810,17 @@
1616+ When the input point is in the closure of the domain of the mathematical
1717+ function and an input argument is +0 (resp.@: @minus{}0), one considers
1818+ the limit when the corresponding argument approaches 0 from above
1919+-(resp.@: below). If the limit is not defined (e.g., @code{mpfr_log} on
2020+-@minus{}0), the behavior is specified in the description of the MPFR function.
2121++(resp.@: below), if possible. If the limit is not defined (e.g.,
2222++@code{mpfr_sqrt} and @code{mpfr_log} on @minus{}0), the behavior is
2323++specified in the description of the MPFR function, but must be consistent
2424++with the rule from the above paragraph (e.g., @code{mpfr_log} on @pom{}0
2525++gives @minus{}Inf).
2626+2727+ When the result is equal to 0, its sign is determined by considering the
2828+ limit as if the input point were not in the domain: If one approaches 0
2929+ from above (resp.@: below), the result is +0 (resp.@: @minus{}0);
3030+-for example, @code{mpfr_sin} on +0 gives +0.
3131++for example, @code{mpfr_sin} on @minus{}0 gives @minus{}0 and
3232++@code{mpfr_acos} on 1 gives +0 (in all rounding modes).
3333+ In the other cases, the sign is specified in the description of the MPFR
3434+ function; for example @code{mpfr_max} on @minus{}0 and +0 gives +0.
3535+3636+@@ -832,8 +836,8 @@
3737+ @c that advantages in practice), like for any bug fix.
3838+ Example: @code{mpfr_hypot} on (NaN,0) gives NaN, but @code{mpfr_hypot}
3939+ on (NaN,+Inf) gives +Inf (as specified in @ref{Special Functions}),
4040+-since for any finite input @var{x}, @code{mpfr_hypot} on (@var{x},+Inf)
4141+-gives +Inf.
4242++since for any finite or infinite input @var{x}, @code{mpfr_hypot} on
4343++(@var{x},+Inf) gives +Inf.
4444+4545+ @node Exceptions, Memory Handling, Floating-Point Values on Special Numbers, MPFR Basics
4646+ @comment node-name, next, previous, up
4747+@@ -1581,7 +1585,8 @@
4848+ @deftypefunx int mpfr_add_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
4949+ @deftypefunx int mpfr_add_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
5050+ Set @var{rop} to @math{@var{op1} + @var{op2}} rounded in the direction
5151+-@var{rnd}. For types having no signed zero, it is considered unsigned
5252++@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
5353++But for types having no signed zeros, 0 is considered unsigned
5454+ (i.e., (+0) + 0 = (+0) and (@minus{}0) + 0 = (@minus{}0)).
5555+ The @code{mpfr_add_d} function assumes that the radix of the @code{double} type
5656+ is a power of 2, with a precision at most that declared by the C implementation
5757+@@ -1599,7 +1604,8 @@
5858+ @deftypefunx int mpfr_sub_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
5959+ @deftypefunx int mpfr_sub_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
6060+ Set @var{rop} to @math{@var{op1} - @var{op2}} rounded in the direction
6161+-@var{rnd}. For types having no signed zero, it is considered unsigned
6262++@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
6363++But for types having no signed zeros, 0 is considered unsigned
6464+ (i.e., (+0) @minus{} 0 = (+0), (@minus{}0) @minus{} 0 = (@minus{}0),
6565+ 0 @minus{} (+0) = (@minus{}0) and 0 @minus{} (@minus{}0) = (+0)).
6666+ The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_sub}
6767+@@ -1615,7 +1621,7 @@
6868+ Set @var{rop} to @math{@var{op1} @GMPtimes{} @var{op2}} rounded in the
6969+ direction @var{rnd}.
7070+ When a result is zero, its sign is the product of the signs of the operands
7171+-(for types having no signed zero, it is considered positive).
7272++(for types having no signed zeros, 0 is considered positive).
7373+ The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_mul_d}.
7474+ @end deftypefun
7575+7676+@@ -1635,7 +1641,7 @@
7777+ @deftypefunx int mpfr_div_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
7878+ Set @var{rop} to @math{@var{op1}/@var{op2}} rounded in the direction @var{rnd}.
7979+ When a result is zero, its sign is the product of the signs of the operands
8080+-(for types having no signed zero, it is considered positive).
8181++(for types having no signed zeros, 0 is considered positive).
8282+ The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_div}
8383+ and @code{mpfr_div_d}.
8484+ @end deftypefun
8585+@@ -1643,15 +1649,18 @@
8686+ @deftypefun int mpfr_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
8787+ @deftypefunx int mpfr_sqrt_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mpfr_rnd_t @var{rnd})
8888+ Set @var{rop} to @m{\sqrt{@var{op}}, the square root of @var{op}}
8989+-rounded in the direction @var{rnd} (set @var{rop} to @minus{}0 if @var{op} is
9090+-@minus{}0, to be consistent with the IEEE 754 standard).
9191++rounded in the direction @var{rnd}. Set @var{rop} to @minus{}0 if
9292++@var{op} is @minus{}0, to be consistent with the IEEE 754 standard.
9393+ Set @var{rop} to NaN if @var{op} is negative.
9494+ @end deftypefun
9595+9696+ @deftypefun int mpfr_rec_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
9797+ Set @var{rop} to @m{1/\sqrt{@var{op}}, the reciprocal square root of @var{op}}
9898+-rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
9999+-@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative.
100100++rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
101101++@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative. Warning!
102102++Therefore the result on @minus{}0 is different from the one of the rSqrt
103103++function recommended by the IEEE 754-2008 standard (Section 9.2.1), which
104104++is @minus{}Inf instead of +Inf.
105105+ @end deftypefun
106106+107107+ @deftypefun int mpfr_cbrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
108108+@@ -1832,7 +1841,9 @@
109109+ @m{\log_2 @var{op}, log2(@var{op})} or
110110+ @m{\log_{10} @var{op}, log10(@var{op})}, respectively,
111111+ rounded in the direction @var{rnd}.
112112+-Set @var{rop} to @minus{}Inf if @var{op} is @minus{}0
113113++Set @var{rop} to +0 if @var{op} is 1 (in all rounding modes),
114114++for consistency with the ISO C99 and IEEE 754-2008 standards.
115115++Set @var{rop} to @minus{}Inf if @var{op} is @pom{}0
116116+ (i.e., the sign of the zero has no influence on the result).
117117+ @end deftypefun
118118+119119+@@ -2003,8 +2014,11 @@
120120+ @deftypefun int mpfr_lngamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
121121+ Set @var{rop} to the value of the logarithm of the Gamma function on @var{op},
122122+ rounded in the direction @var{rnd}.
123123+-When @math{@minus{}2@var{k}@minus{}1 @le{} @var{op} @le{} @minus{}2@var{k}},
124124+-@var{k} being a non-negative integer, @var{rop} is set to NaN.
125125++When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
126126++When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf,
127127++following the general rules on special values.
128128++When @math{@minus{}2@var{k}@minus{}1 < @var{op} < @minus{}2@var{k}},
129129++@var{k} being a nonnegative integer, set @var{rop} to NaN@.
130130+ See also @code{mpfr_lgamma}.
131131+ @end deftypefun
132132+133133+@@ -2012,10 +2026,11 @@
134134+ Set @var{rop} to the value of the logarithm of the absolute value of the
135135+ Gamma function on @var{op}, rounded in the direction @var{rnd}. The sign
136136+ (1 or @minus{}1) of Gamma(@var{op}) is returned in the object pointed to
137137+-by @var{signp}. When @var{op} is an infinity or a non-positive integer, set
138138+-@var{rop} to +Inf. When @var{op} is NaN, @minus{}Inf or a negative integer,
139139+-*@var{signp} is undefined, and when @var{op} is @pom{}0, *@var{signp} is
140140+-the sign of the zero.
141141++by @var{signp}.
142142++When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
143143++When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf.
144144++When @var{op} is NaN, @minus{}Inf or a negative integer, *@var{signp} is
145145++undefined, and when @var{op} is @pom{}0, *@var{signp} is the sign of the zero.
146146+ @end deftypefun
147147+148148+ @deftypefun int mpfr_digamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
149149+@@ -2064,7 +2079,10 @@
150150+ @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})
151151+ Set @var{rop} to @math{(@var{op1} @GMPtimes{} @var{op2}) + @var{op3}}
152152+ (resp.@: @math{(@var{op1} @GMPtimes{} @var{op2}) - @var{op3}})
153153+-rounded in the direction @var{rnd}.
154154++rounded in the direction @var{rnd}. Concerning special values (signed zeros,
155155++infinities, NaN), these functions behave like a multiplication followed by a
156156++separate addition or subtraction. That is, the fused operation matters only
157157++for rounding.
158158+ @end deftypefun
159159+160160+ @deftypefun int mpfr_agm (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_rnd_t @var{rnd})
161161+@@ -2089,8 +2107,8 @@
162162+ i.e., $\sqrt{x^2+y^2}$,
163163+ @end tex
164164+ rounded in the direction @var{rnd}.
165165+-Special values are handled as described in Section F.9.4.3 of
166166+-the ISO C99 and IEEE 754-2008 standards:
167167++Special values are handled as described in the ISO C99 (Section F.9.4.3)
168168++and IEEE 754-2008 (Section 9.2.1) standards:
169169+ If @var{x} or @var{y} is an infinity, then +Inf is returned in @var{rop},
170170+ even if the other number is NaN.
171171+ @end deftypefun
172172+diff -Naurd mpfr-3.1.3-a/doc/mpfr.info mpfr-3.1.3-b/doc/mpfr.info
173173+--- mpfr-3.1.3-a/doc/mpfr.info 2015-06-19 19:55:53.000000000 +0000
174174++++ mpfr-3.1.3-b/doc/mpfr.info 2015-07-02 10:49:38.718267817 +0000
175175+@@ -1,4 +1,4 @@
176176+-This is mpfr.info, produced by makeinfo version 5.2 from mpfr.texi.
177177++This is mpfr.info, produced by makeinfo version 6.0 from mpfr.texi.
178178+179179+ This manual documents how to install and use the Multiple Precision
180180+ Floating-Point Reliable Library, version 3.1.3.
181181+@@ -55,7 +55,7 @@
182182+ MPFR Copying Conditions
183183+ ***********************
184184+185185+-The GNU MPFR library (or MPFR for short) is "free"; this means that
186186++The GNU MPFR library (or MPFR for short) is “free”; this means that
187187+ everyone is free to use it and free to redistribute it on a free basis.
188188+ The library is not in the public domain; it is copyrighted and there are
189189+ restrictions on its distribution, but these restrictions are designed to
190190+@@ -418,7 +418,7 @@
191191+ 4.2 Nomenclature and Types
192192+ ==========================
193193+194194+-A "floating-point number", or "float" for short, is an arbitrary
195195++A “floating-point number”, or “float” for short, is an arbitrary
196196+ precision significand (also called mantissa) with a limited precision
197197+ exponent. The C data type for such objects is ‘mpfr_t’ (internally
198198+ defined as a one-element array of a structure, and ‘mpfr_ptr’ is the C
199199+@@ -432,7 +432,7 @@
200200+ to the other functions supported by MPFR. Unless documented otherwise,
201201+ the sign bit of a NaN is unspecified.
202202+203203+-The "precision" is the number of bits used to represent the significand
204204++The “precision” is the number of bits used to represent the significand
205205+ of a floating-point number; the corresponding C data type is
206206+ ‘mpfr_prec_t’. The precision can be any integer between ‘MPFR_PREC_MIN’
207207+ and ‘MPFR_PREC_MAX’. In the current implementation, ‘MPFR_PREC_MIN’ is
208208+@@ -446,7 +446,7 @@
209209+ may abort, crash or have undefined behavior (depending on your C
210210+ implementation).
211211+212212+-The "rounding mode" specifies the way to round the result of a
213213++The “rounding mode” specifies the way to round the result of a
214214+ floating-point operation, in case the exact result can not be
215215+ represented exactly in the destination significand; the corresponding C
216216+ data type is ‘mpfr_rnd_t’.
217217+@@ -499,14 +499,14 @@
218218+ representable numbers, it is rounded to the one with the least
219219+ significant bit set to zero. For example, the number 2.5, which is
220220+ represented by (10.1) in binary, is rounded to (10.0)=2 with a precision
221221+-of two bits, and not to (11.0)=3. This rule avoids the "drift"
222222++of two bits, and not to (11.0)=3. This rule avoids the “drift”
223223+ phenomenon mentioned by Knuth in volume 2 of The Art of Computer
224224+ Programming (Section 4.2.2).
225225+226226+ Most MPFR functions take as first argument the destination variable,
227227+ as second and following arguments the input variables, as last argument
228228+ a rounding mode, and have a return value of type ‘int’, called the
229229+-"ternary value". The value stored in the destination variable is
230230++“ternary value”. The value stored in the destination variable is
231231+ correctly rounded, i.e., MPFR behaves as if it computed the result with
232232+ an infinite precision, then rounded it to the precision of this
233233+ variable. The input variables are regarded as exact (in particular,
234234+@@ -572,15 +572,18 @@
235235+ When the input point is in the closure of the domain of the
236236+ mathematical function and an input argument is +0 (resp. −0), one
237237+ considers the limit when the corresponding argument approaches 0 from
238238+-above (resp. below). If the limit is not defined (e.g., ‘mpfr_log’ on
239239+-−0), the behavior is specified in the description of the MPFR function.
240240++above (resp. below), if possible. If the limit is not defined (e.g.,
241241++‘mpfr_sqrt’ and ‘mpfr_log’ on −0), the behavior is specified in the
242242++description of the MPFR function, but must be consistent with the rule
243243++from the above paragraph (e.g., ‘mpfr_log’ on ±0 gives −Inf).
244244+245245+ When the result is equal to 0, its sign is determined by considering
246246+ the limit as if the input point were not in the domain: If one
247247+ approaches 0 from above (resp. below), the result is +0 (resp. −0); for
248248+-example, ‘mpfr_sin’ on +0 gives +0. In the other cases, the sign is
249249+-specified in the description of the MPFR function; for example
250250+-‘mpfr_max’ on −0 and +0 gives +0.
251251++example, ‘mpfr_sin’ on −0 gives −0 and ‘mpfr_acos’ on 1 gives +0 (in all
252252++rounding modes). In the other cases, the sign is specified in the
253253++description of the MPFR function; for example ‘mpfr_max’ on −0 and +0
254254++gives +0.
255255+256256+ When the input point is not in the closure of the domain of the
257257+ function, the result is NaN. Example: ‘mpfr_sqrt’ on −17 gives NaN.
258258+@@ -590,8 +593,8 @@
259259+ numbers; such a case is always explicitly specified in *note MPFR
260260+ Interface::. Example: ‘mpfr_hypot’ on (NaN,0) gives NaN, but
261261+ ‘mpfr_hypot’ on (NaN,+Inf) gives +Inf (as specified in *note Special
262262+-Functions::), since for any finite input X, ‘mpfr_hypot’ on (X,+Inf)
263263+-gives +Inf.
264264++Functions::), since for any finite or infinite input X, ‘mpfr_hypot’ on
265265++(X,+Inf) gives +Inf.
266266+267267+268268+ File: mpfr.info, Node: Exceptions, Next: Memory Handling, Prev: Floating-Point Values on Special Numbers, Up: MPFR Basics
269269+@@ -1253,8 +1256,9 @@
270270+ mpfr_rnd_t RND)
271271+ -- Function: int mpfr_add_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
272272+ mpfr_rnd_t RND)
273273+- Set ROP to OP1 + OP2 rounded in the direction RND. For types
274274+- having no signed zero, it is considered unsigned (i.e., (+0) + 0 =
275275++ Set ROP to OP1 + OP2 rounded in the direction RND. The IEEE-754
276276++ rules are used, in particular for signed zeros. But for types
277277++ having no signed zeros, 0 is considered unsigned (i.e., (+0) + 0 =
278278+ (+0) and (−0) + 0 = (−0)). The ‘mpfr_add_d’ function assumes that
279279+ the radix of the ‘double’ type is a power of 2, with a precision at
280280+ most that declared by the C implementation (macro
281281+@@ -1280,8 +1284,9 @@
282282+ mpfr_rnd_t RND)
283283+ -- Function: int mpfr_sub_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
284284+ mpfr_rnd_t RND)
285285+- Set ROP to OP1 - OP2 rounded in the direction RND. For types
286286+- having no signed zero, it is considered unsigned (i.e., (+0) − 0 =
287287++ Set ROP to OP1 - OP2 rounded in the direction RND. The IEEE-754
288288++ rules are used, in particular for signed zeros. But for types
289289++ having no signed zeros, 0 is considered unsigned (i.e., (+0) − 0 =
290290+ (+0), (−0) − 0 = (−0), 0 − (+0) = (−0) and 0 − (−0) = (+0)). The
291291+ same restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_sub’ and
292292+ ‘mpfr_sub_d’.
293293+@@ -1300,7 +1305,7 @@
294294+ mpfr_rnd_t RND)
295295+ Set ROP to OP1 times OP2 rounded in the direction RND. When a
296296+ result is zero, its sign is the product of the signs of the
297297+- operands (for types having no signed zero, it is considered
298298++ operands (for types having no signed zeros, 0 is considered
299299+ positive). The same restrictions than for ‘mpfr_add_d’ apply to
300300+ ‘mpfr_mul_d’.
301301+302302+@@ -1327,21 +1332,24 @@
303303+ mpfr_rnd_t RND)
304304+ Set ROP to OP1/OP2 rounded in the direction RND. When a result is
305305+ zero, its sign is the product of the signs of the operands (for
306306+- types having no signed zero, it is considered positive). The same
307307++ types having no signed zeros, 0 is considered positive). The same
308308+ restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_div’ and
309309+ ‘mpfr_div_d’.
310310+311311+ -- Function: int mpfr_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
312312+ -- Function: int mpfr_sqrt_ui (mpfr_t ROP, unsigned long int OP,
313313+ mpfr_rnd_t RND)
314314+- Set ROP to the square root of OP rounded in the direction RND (set
315315+- ROP to −0 if OP is −0, to be consistent with the IEEE 754
316316+- standard). Set ROP to NaN if OP is negative.
317317++ Set ROP to the square root of OP rounded in the direction RND. Set
318318++ ROP to −0 if OP is −0, to be consistent with the IEEE 754 standard.
319319++ Set ROP to NaN if OP is negative.
320320+321321+ -- Function: int mpfr_rec_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
322322+ Set ROP to the reciprocal square root of OP rounded in the
323323+ direction RND. Set ROP to +Inf if OP is ±0, +0 if OP is +Inf, and
324324+- NaN if OP is negative.
325325++ NaN if OP is negative. Warning! Therefore the result on −0 is
326326++ different from the one of the rSqrt function recommended by the
327327++ IEEE 754-2008 standard (Section 9.2.1), which is −Inf instead of
328328++ +Inf.
329329+330330+ -- Function: int mpfr_cbrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
331331+ -- Function: int mpfr_root (mpfr_t ROP, mpfr_t OP, unsigned long int K,
332332+@@ -1515,8 +1523,10 @@
333333+ -- Function: int mpfr_log2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
334334+ -- Function: int mpfr_log10 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
335335+ Set ROP to the natural logarithm of OP, log2(OP) or log10(OP),
336336+- respectively, rounded in the direction RND. Set ROP to −Inf if OP
337337+- is −0 (i.e., the sign of the zero has no influence on the result).
338338++ respectively, rounded in the direction RND. Set ROP to +0 if OP is
339339++ 1 (in all rounding modes), for consistency with the ISO C99 and
340340++ IEEE 754-2008 standards. Set ROP to −Inf if OP is ±0 (i.e., the
341341++ sign of the zero has no influence on the result).
342342+343343+ -- Function: int mpfr_exp (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
344344+ -- Function: int mpfr_exp2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
345345+@@ -1649,17 +1659,21 @@
346346+347347+ -- Function: int mpfr_lngamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
348348+ Set ROP to the value of the logarithm of the Gamma function on OP,
349349+- rounded in the direction RND. When −2K−1 <= OP <= −2K, K being a
350350+- non-negative integer, ROP is set to NaN. See also ‘mpfr_lgamma’.
351351++ rounded in the direction RND. When OP is 1 or 2, set ROP to +0 (in
352352++ all rounding modes). When OP is an infinity or a nonpositive
353353++ integer, set ROP to +Inf, following the general rules on special
354354++ values. When −2K−1 < OP < −2K, K being a nonnegative integer, set
355355++ ROP to NaN. See also ‘mpfr_lgamma’.
356356+357357+ -- Function: int mpfr_lgamma (mpfr_t ROP, int *SIGNP, mpfr_t OP,
358358+ mpfr_rnd_t RND)
359359+ Set ROP to the value of the logarithm of the absolute value of the
360360+ Gamma function on OP, rounded in the direction RND. The sign (1 or
361361+ −1) of Gamma(OP) is returned in the object pointed to by SIGNP.
362362+- When OP is an infinity or a non-positive integer, set ROP to +Inf.
363363+- When OP is NaN, −Inf or a negative integer, *SIGNP is undefined,
364364+- and when OP is ±0, *SIGNP is the sign of the zero.
365365++ When OP is 1 or 2, set ROP to +0 (in all rounding modes). When OP
366366++ is an infinity or a nonpositive integer, set ROP to +Inf. When OP
367367++ is NaN, −Inf or a negative integer, *SIGNP is undefined, and when
368368++ OP is ±0, *SIGNP is the sign of the zero.
369369+370370+ -- Function: int mpfr_digamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
371371+ Set ROP to the value of the Digamma (sometimes also called Psi)
372372+@@ -1703,7 +1717,10 @@
373373+ -- Function: int mpfr_fms (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2, mpfr_t
374374+ OP3, mpfr_rnd_t RND)
375375+ Set ROP to (OP1 times OP2) + OP3 (resp. (OP1 times OP2) - OP3)
376376+- rounded in the direction RND.
377377++ rounded in the direction RND. Concerning special values (signed
378378++ zeros, infinities, NaN), these functions behave like a
379379++ multiplication followed by a separate addition or subtraction.
380380++ That is, the fused operation matters only for rounding.
381381+382382+ -- Function: int mpfr_agm (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2,
383383+ mpfr_rnd_t RND)
384384+@@ -1717,9 +1734,10 @@
385385+ RND)
386386+ Set ROP to the Euclidean norm of X and Y, i.e., the square root of
387387+ the sum of the squares of X and Y, rounded in the direction RND.
388388+- Special values are handled as described in Section F.9.4.3 of the
389389+- ISO C99 and IEEE 754-2008 standards: If X or Y is an infinity, then
390390+- +Inf is returned in ROP, even if the other number is NaN.
391391++ Special values are handled as described in the ISO C99 (Section
392392++ F.9.4.3) and IEEE 754-2008 (Section 9.2.1) standards: If X or Y is
393393++ an infinity, then +Inf is returned in ROP, even if the other number
394394++ is NaN.
395395+396396+ -- Function: int mpfr_ai (mpfr_t ROP, mpfr_t X, mpfr_rnd_t RND)
397397+ Set ROP to the value of the Airy function Ai on X, rounded in the
398398+@@ -2670,7 +2688,7 @@
399399+ 5.16 Internals
400400+ ==============
401401+402402+-A "limb" means the part of a multi-precision number that fits in a
403403++A “limb” means the part of a multi-precision number that fits in a
404404+ single word. Usually a limb contains 32 or 64 bits. The C data type
405405+ for a limb is ‘mp_limb_t’.
406406+407407+@@ -3140,7 +3158,7 @@
408408+ 0. PREAMBLE
409409+410410+ The purpose of this License is to make a manual, textbook, or other
411411+- functional and useful document "free" in the sense of freedom: to
412412++ functional and useful document “free” in the sense of freedom: to
413413+ assure everyone the effective freedom to copy and redistribute it,
414414+ with or without modifying it, either commercially or
415415+ noncommercially. Secondarily, this License preserves for the
416416+@@ -3655,9 +3673,9 @@
417417+ * Menu:
418418+419419+ * mpfr_abs: Basic Arithmetic Functions.
420420+- (line 160)
421421+-* mpfr_acos: Special Functions. (line 51)
422422+-* mpfr_acosh: Special Functions. (line 115)
423423++ (line 165)
424424++* mpfr_acos: Special Functions. (line 53)
425425++* mpfr_acosh: Special Functions. (line 117)
426426+ * mpfr_add: Basic Arithmetic Functions.
427427+ (line 6)
428428+ * mpfr_add_d: Basic Arithmetic Functions.
429429+@@ -3670,15 +3688,15 @@
430430+ (line 8)
431431+ * mpfr_add_z: Basic Arithmetic Functions.
432432+ (line 14)
433433+-* mpfr_agm: Special Functions. (line 210)
434434+-* mpfr_ai: Special Functions. (line 226)
435435+-* mpfr_asin: Special Functions. (line 52)
436436+-* mpfr_asinh: Special Functions. (line 116)
437437++* mpfr_agm: Special Functions. (line 219)
438438++* mpfr_ai: Special Functions. (line 236)
439439++* mpfr_asin: Special Functions. (line 54)
440440++* mpfr_asinh: Special Functions. (line 118)
441441+ * mpfr_asprintf: Formatted Output Functions.
442442+ (line 193)
443443+-* mpfr_atan: Special Functions. (line 53)
444444+-* mpfr_atan2: Special Functions. (line 63)
445445+-* mpfr_atanh: Special Functions. (line 117)
446446++* mpfr_atan: Special Functions. (line 55)
447447++* mpfr_atan2: Special Functions. (line 65)
448448++* mpfr_atanh: Special Functions. (line 119)
449449+ * mpfr_buildopt_decimal_p: Miscellaneous Functions.
450450+ (line 162)
451451+ * mpfr_buildopt_gmpinternals_p: Miscellaneous Functions.
452452+@@ -3690,7 +3708,7 @@
453453+ * mpfr_can_round: Rounding Related Functions.
454454+ (line 39)
455455+ * mpfr_cbrt: Basic Arithmetic Functions.
456456+- (line 108)
457457++ (line 113)
458458+ * mpfr_ceil: Integer Related Functions.
459459+ (line 7)
460460+ * mpfr_check_range: Exception Related Functions.
461461+@@ -3735,18 +3753,18 @@
462462+ (line 27)
463463+ * mpfr_cmp_z: Comparison Functions.
464464+ (line 11)
465465+-* mpfr_const_catalan: Special Functions. (line 237)
466466+-* mpfr_const_euler: Special Functions. (line 236)
467467+-* mpfr_const_log2: Special Functions. (line 234)
468468+-* mpfr_const_pi: Special Functions. (line 235)
469469++* mpfr_const_catalan: Special Functions. (line 247)
470470++* mpfr_const_euler: Special Functions. (line 246)
471471++* mpfr_const_log2: Special Functions. (line 244)
472472++* mpfr_const_pi: Special Functions. (line 245)
473473+ * mpfr_copysign: Miscellaneous Functions.
474474+ (line 109)
475475+-* mpfr_cos: Special Functions. (line 29)
476476+-* mpfr_cosh: Special Functions. (line 95)
477477+-* mpfr_cot: Special Functions. (line 47)
478478+-* mpfr_coth: Special Functions. (line 111)
479479+-* mpfr_csc: Special Functions. (line 46)
480480+-* mpfr_csch: Special Functions. (line 110)
481481++* mpfr_cos: Special Functions. (line 31)
482482++* mpfr_cosh: Special Functions. (line 97)
483483++* mpfr_cot: Special Functions. (line 49)
484484++* mpfr_coth: Special Functions. (line 113)
485485++* mpfr_csc: Special Functions. (line 48)
486486++* mpfr_csch: Special Functions. (line 112)
487487+ * mpfr_custom_get_exp: Custom Interface. (line 75)
488488+ * mpfr_custom_get_kind: Custom Interface. (line 65)
489489+ * mpfr_custom_get_significand: Custom Interface. (line 70)
490490+@@ -3756,47 +3774,47 @@
491491+ * mpfr_custom_move: Custom Interface. (line 82)
492492+ * MPFR_DECL_INIT: Initialization Functions.
493493+ (line 74)
494494+-* mpfr_digamma: Special Functions. (line 166)
495495++* mpfr_digamma: Special Functions. (line 172)
496496+ * mpfr_dim: Basic Arithmetic Functions.
497497+- (line 166)
498498++ (line 171)
499499+ * mpfr_div: Basic Arithmetic Functions.
500500+- (line 72)
501501++ (line 74)
502502+ * mpfr_divby0_p: Exception Related Functions.
503503+ (line 134)
504504+ * mpfr_div_2exp: Compatibility with MPF.
505505+ (line 49)
506506+ * mpfr_div_2si: Basic Arithmetic Functions.
507507+- (line 181)
508508++ (line 186)
509509+ * mpfr_div_2ui: Basic Arithmetic Functions.
510510+- (line 179)
511511++ (line 184)
512512+ * mpfr_div_d: Basic Arithmetic Functions.
513513+- (line 84)
514514++ (line 86)
515515+ * mpfr_div_q: Basic Arithmetic Functions.
516516+- (line 88)
517517++ (line 90)
518518+ * mpfr_div_si: Basic Arithmetic Functions.
519519+- (line 80)
520520++ (line 82)
521521+ * mpfr_div_ui: Basic Arithmetic Functions.
522522+- (line 76)
523523++ (line 78)
524524+ * mpfr_div_z: Basic Arithmetic Functions.
525525+- (line 86)
526526++ (line 88)
527527+ * mpfr_d_div: Basic Arithmetic Functions.
528528+- (line 82)
529529++ (line 84)
530530+ * mpfr_d_sub: Basic Arithmetic Functions.
531531+- (line 35)
532532+-* mpfr_eint: Special Functions. (line 133)
533533++ (line 36)
534534++* mpfr_eint: Special Functions. (line 135)
535535+ * mpfr_eq: Compatibility with MPF.
536536+ (line 28)
537537+ * mpfr_equal_p: Comparison Functions.
538538+ (line 59)
539539+ * mpfr_erangeflag_p: Exception Related Functions.
540540+ (line 137)
541541+-* mpfr_erf: Special Functions. (line 177)
542542+-* mpfr_erfc: Special Functions. (line 178)
543543+-* mpfr_exp: Special Functions. (line 23)
544544+-* mpfr_exp10: Special Functions. (line 25)
545545+-* mpfr_exp2: Special Functions. (line 24)
546546+-* mpfr_expm1: Special Functions. (line 129)
547547+-* mpfr_fac_ui: Special Functions. (line 121)
548548++* mpfr_erf: Special Functions. (line 183)
549549++* mpfr_erfc: Special Functions. (line 184)
550550++* mpfr_exp: Special Functions. (line 25)
551551++* mpfr_exp10: Special Functions. (line 27)
552552++* mpfr_exp2: Special Functions. (line 26)
553553++* mpfr_expm1: Special Functions. (line 131)
554554++* mpfr_fac_ui: Special Functions. (line 123)
555555+ * mpfr_fits_intmax_p: Conversion Functions.
556556+ (line 150)
557557+ * mpfr_fits_sint_p: Conversion Functions.
558558+@@ -3815,20 +3833,20 @@
559559+ (line 147)
560560+ * mpfr_floor: Integer Related Functions.
561561+ (line 8)
562562+-* mpfr_fma: Special Functions. (line 203)
563563++* mpfr_fma: Special Functions. (line 209)
564564+ * mpfr_fmod: Integer Related Functions.
565565+ (line 92)
566566+-* mpfr_fms: Special Functions. (line 205)
567567++* mpfr_fms: Special Functions. (line 211)
568568+ * mpfr_fprintf: Formatted Output Functions.
569569+ (line 157)
570570+ * mpfr_frac: Integer Related Functions.
571571+ (line 76)
572572+-* mpfr_free_cache: Special Functions. (line 244)
573573++* mpfr_free_cache: Special Functions. (line 254)
574574+ * mpfr_free_str: Conversion Functions.
575575+ (line 137)
576576+ * mpfr_frexp: Conversion Functions.
577577+ (line 45)
578578+-* mpfr_gamma: Special Functions. (line 148)
579579++* mpfr_gamma: Special Functions. (line 150)
580580+ * mpfr_get_d: Conversion Functions.
581581+ (line 7)
582582+ * mpfr_get_decimal64: Conversion Functions.
583583+@@ -3887,7 +3905,7 @@
584584+ (line 56)
585585+ * mpfr_greater_p: Comparison Functions.
586586+ (line 55)
587587+-* mpfr_hypot: Special Functions. (line 218)
588588++* mpfr_hypot: Special Functions. (line 227)
589589+ * mpfr_inexflag_p: Exception Related Functions.
590590+ (line 136)
591591+ * mpfr_inf_p: Comparison Functions.
592592+@@ -3922,21 +3940,21 @@
593593+ (line 31)
594594+ * mpfr_integer_p: Integer Related Functions.
595595+ (line 119)
596596+-* mpfr_j0: Special Functions. (line 182)
597597+-* mpfr_j1: Special Functions. (line 183)
598598+-* mpfr_jn: Special Functions. (line 184)
599599++* mpfr_j0: Special Functions. (line 188)
600600++* mpfr_j1: Special Functions. (line 189)
601601++* mpfr_jn: Special Functions. (line 190)
602602+ * mpfr_lessequal_p: Comparison Functions.
603603+ (line 58)
604604+ * mpfr_lessgreater_p: Comparison Functions.
605605+ (line 64)
606606+ * mpfr_less_p: Comparison Functions.
607607+ (line 57)
608608+-* mpfr_lgamma: Special Functions. (line 157)
609609+-* mpfr_li2: Special Functions. (line 143)
610610+-* mpfr_lngamma: Special Functions. (line 152)
611611++* mpfr_lgamma: Special Functions. (line 162)
612612++* mpfr_li2: Special Functions. (line 145)
613613++* mpfr_lngamma: Special Functions. (line 154)
614614+ * mpfr_log: Special Functions. (line 16)
615615+ * mpfr_log10: Special Functions. (line 18)
616616+-* mpfr_log1p: Special Functions. (line 125)
617617++* mpfr_log1p: Special Functions. (line 127)
618618+ * mpfr_log2: Special Functions. (line 17)
619619+ * mpfr_max: Miscellaneous Functions.
620620+ (line 22)
621621+@@ -3947,29 +3965,29 @@
622622+ * mpfr_modf: Integer Related Functions.
623623+ (line 82)
624624+ * mpfr_mul: Basic Arithmetic Functions.
625625+- (line 51)
626626++ (line 53)
627627+ * mpfr_mul_2exp: Compatibility with MPF.
628628+ (line 47)
629629+ * mpfr_mul_2si: Basic Arithmetic Functions.
630630+- (line 174)
631631++ (line 179)
632632+ * mpfr_mul_2ui: Basic Arithmetic Functions.
633633+- (line 172)
634634++ (line 177)
635635+ * mpfr_mul_d: Basic Arithmetic Functions.
636636+- (line 57)
637637++ (line 59)
638638+ * mpfr_mul_q: Basic Arithmetic Functions.
639639+- (line 61)
640640++ (line 63)
641641+ * mpfr_mul_si: Basic Arithmetic Functions.
642642+- (line 55)
643643++ (line 57)
644644+ * mpfr_mul_ui: Basic Arithmetic Functions.
645645+- (line 53)
646646++ (line 55)
647647+ * mpfr_mul_z: Basic Arithmetic Functions.
648648+- (line 59)
649649++ (line 61)
650650+ * mpfr_nanflag_p: Exception Related Functions.
651651+ (line 135)
652652+ * mpfr_nan_p: Comparison Functions.
653653+ (line 39)
654654+ * mpfr_neg: Basic Arithmetic Functions.
655655+- (line 159)
656656++ (line 164)
657657+ * mpfr_nextabove: Miscellaneous Functions.
658658+ (line 15)
659659+ * mpfr_nextbelow: Miscellaneous Functions.
660660+@@ -3983,13 +4001,13 @@
661661+ * mpfr_overflow_p: Exception Related Functions.
662662+ (line 133)
663663+ * mpfr_pow: Basic Arithmetic Functions.
664664+- (line 116)
665665++ (line 121)
666666+ * mpfr_pow_si: Basic Arithmetic Functions.
667667+- (line 120)
668668++ (line 125)
669669+ * mpfr_pow_ui: Basic Arithmetic Functions.
670670+- (line 118)
671671++ (line 123)
672672+ * mpfr_pow_z: Basic Arithmetic Functions.
673673+- (line 122)
674674++ (line 127)
675675+ * mpfr_prec_round: Rounding Related Functions.
676676+ (line 13)
677677+ * ‘mpfr_prec_t’: Nomenclature and Types.
678678+@@ -3999,7 +4017,7 @@
679679+ * mpfr_print_rnd_mode: Rounding Related Functions.
680680+ (line 71)
681681+ * mpfr_rec_sqrt: Basic Arithmetic Functions.
682682+- (line 103)
683683++ (line 105)
684684+ * mpfr_regular_p: Comparison Functions.
685685+ (line 43)
686686+ * mpfr_reldiff: Compatibility with MPF.
687687+@@ -4021,11 +4039,11 @@
688688+ * ‘mpfr_rnd_t’: Nomenclature and Types.
689689+ (line 34)
690690+ * mpfr_root: Basic Arithmetic Functions.
691691+- (line 109)
692692++ (line 114)
693693+ * mpfr_round: Integer Related Functions.
694694+ (line 9)
695695+-* mpfr_sec: Special Functions. (line 45)
696696+-* mpfr_sech: Special Functions. (line 109)
697697++* mpfr_sec: Special Functions. (line 47)
698698++* mpfr_sech: Special Functions. (line 111)
699699+ * mpfr_set: Assignment Functions.
700700+ (line 9)
701701+ * mpfr_setsign: Miscellaneous Functions.
702702+@@ -4100,57 +4118,57 @@
703703+ (line 49)
704704+ * mpfr_signbit: Miscellaneous Functions.
705705+ (line 99)
706706+-* mpfr_sin: Special Functions. (line 30)
707707+-* mpfr_sinh: Special Functions. (line 96)
708708+-* mpfr_sinh_cosh: Special Functions. (line 101)
709709+-* mpfr_sin_cos: Special Functions. (line 35)
710710++* mpfr_sin: Special Functions. (line 32)
711711++* mpfr_sinh: Special Functions. (line 98)
712712++* mpfr_sinh_cosh: Special Functions. (line 103)
713713++* mpfr_sin_cos: Special Functions. (line 37)
714714+ * mpfr_si_div: Basic Arithmetic Functions.
715715+- (line 78)
716716++ (line 80)
717717+ * mpfr_si_sub: Basic Arithmetic Functions.
718718+- (line 31)
719719++ (line 32)
720720+ * mpfr_snprintf: Formatted Output Functions.
721721+ (line 180)
722722+ * mpfr_sprintf: Formatted Output Functions.
723723+ (line 170)
724724+ * mpfr_sqr: Basic Arithmetic Functions.
725725+- (line 69)
726726++ (line 71)
727727+ * mpfr_sqrt: Basic Arithmetic Functions.
728728+- (line 96)
729729++ (line 98)
730730+ * mpfr_sqrt_ui: Basic Arithmetic Functions.
731731+- (line 97)
732732++ (line 99)
733733+ * mpfr_strtofr: Assignment Functions.
734734+ (line 80)
735735+ * mpfr_sub: Basic Arithmetic Functions.
736736+- (line 25)
737737++ (line 26)
738738+ * mpfr_subnormalize: Exception Related Functions.
739739+ (line 60)
740740+ * mpfr_sub_d: Basic Arithmetic Functions.
741741+- (line 37)
742742++ (line 38)
743743+ * mpfr_sub_q: Basic Arithmetic Functions.
744744+- (line 43)
745745++ (line 44)
746746+ * mpfr_sub_si: Basic Arithmetic Functions.
747747+- (line 33)
748748++ (line 34)
749749+ * mpfr_sub_ui: Basic Arithmetic Functions.
750750+- (line 29)
751751++ (line 30)
752752+ * mpfr_sub_z: Basic Arithmetic Functions.
753753+- (line 41)
754754+-* mpfr_sum: Special Functions. (line 252)
755755++ (line 42)
756756++* mpfr_sum: Special Functions. (line 262)
757757+ * mpfr_swap: Assignment Functions.
758758+ (line 150)
759759+ * ‘mpfr_t’: Nomenclature and Types.
760760+ (line 6)
761761+-* mpfr_tan: Special Functions. (line 31)
762762+-* mpfr_tanh: Special Functions. (line 97)
763763++* mpfr_tan: Special Functions. (line 33)
764764++* mpfr_tanh: Special Functions. (line 99)
765765+ * mpfr_trunc: Integer Related Functions.
766766+ (line 10)
767767+ * mpfr_ui_div: Basic Arithmetic Functions.
768768+- (line 74)
769769++ (line 76)
770770+ * mpfr_ui_pow: Basic Arithmetic Functions.
771771+- (line 126)
772772++ (line 131)
773773+ * mpfr_ui_pow_ui: Basic Arithmetic Functions.
774774+- (line 124)
775775++ (line 129)
776776+ * mpfr_ui_sub: Basic Arithmetic Functions.
777777+- (line 27)
778778++ (line 28)
779779+ * mpfr_underflow_p: Exception Related Functions.
780780+ (line 132)
781781+ * mpfr_unordered_p: Comparison Functions.
782782+@@ -4181,61 +4199,61 @@
783783+ (line 182)
784784+ * mpfr_vsprintf: Formatted Output Functions.
785785+ (line 171)
786786+-* mpfr_y0: Special Functions. (line 193)
787787+-* mpfr_y1: Special Functions. (line 194)
788788+-* mpfr_yn: Special Functions. (line 195)
789789++* mpfr_y0: Special Functions. (line 199)
790790++* mpfr_y1: Special Functions. (line 200)
791791++* mpfr_yn: Special Functions. (line 201)
792792+ * mpfr_zero_p: Comparison Functions.
793793+ (line 42)
794794+-* mpfr_zeta: Special Functions. (line 171)
795795+-* mpfr_zeta_ui: Special Functions. (line 172)
796796++* mpfr_zeta: Special Functions. (line 177)
797797++* mpfr_zeta_ui: Special Functions. (line 178)
798798+ * mpfr_z_sub: Basic Arithmetic Functions.
799799+- (line 39)
800800++ (line 40)
801801+802802+803803+804804+ Tag Table:
805805+ Node: Top775
806806+ Node: Copying2007
807807+-Node: Introduction to MPFR3766
808808+-Node: Installing MPFR5880
809809+-Node: Reporting Bugs11323
810810+-Node: MPFR Basics13353
811811+-Node: Headers and Libraries13669
812812+-Node: Nomenclature and Types16828
813813+-Node: MPFR Variable Conventions18874
814814+-Node: Rounding Modes20418
815815+-Ref: ternary value21544
816816+-Node: Floating-Point Values on Special Numbers23526
817817+-Node: Exceptions26572
818818+-Node: Memory Handling29749
819819+-Node: MPFR Interface30894
820820+-Node: Initialization Functions33008
821821+-Node: Assignment Functions40318
822822+-Node: Combined Initialization and Assignment Functions49673
823823+-Node: Conversion Functions50974
824824+-Node: Basic Arithmetic Functions60035
825825+-Node: Comparison Functions69200
826826+-Node: Special Functions72687
827827+-Node: Input and Output Functions86672
828828+-Node: Formatted Output Functions88644
829829+-Node: Integer Related Functions98431
830830+-Node: Rounding Related Functions105051
831831+-Node: Miscellaneous Functions108888
832832+-Node: Exception Related Functions117568
833833+-Node: Compatibility with MPF124386
834834+-Node: Custom Interface127127
835835+-Node: Internals131526
836836+-Node: API Compatibility133066
837837+-Node: Type and Macro Changes134995
838838+-Node: Added Functions137844
839839+-Node: Changed Functions141132
840840+-Node: Removed Functions145545
841841+-Node: Other Changes145973
842842+-Node: Contributors147576
843843+-Node: References150219
844844+-Node: GNU Free Documentation License151973
845845+-Node: Concept Index174562
846846+-Node: Function and Type Index180659
847847++Node: Introduction to MPFR3770
848848++Node: Installing MPFR5884
849849++Node: Reporting Bugs11327
850850++Node: MPFR Basics13357
851851++Node: Headers and Libraries13673
852852++Node: Nomenclature and Types16832
853853++Node: MPFR Variable Conventions18894
854854++Node: Rounding Modes20438
855855++Ref: ternary value21568
856856++Node: Floating-Point Values on Special Numbers23554
857857++Node: Exceptions26813
858858++Node: Memory Handling29990
859859++Node: MPFR Interface31135
860860++Node: Initialization Functions33249
861861++Node: Assignment Functions40559
862862++Node: Combined Initialization and Assignment Functions49914
863863++Node: Conversion Functions51215
864864++Node: Basic Arithmetic Functions60276
865865++Node: Comparison Functions69777
866866++Node: Special Functions73264
867867++Node: Input and Output Functions87862
868868++Node: Formatted Output Functions89834
869869++Node: Integer Related Functions99621
870870++Node: Rounding Related Functions106241
871871++Node: Miscellaneous Functions110078
872872++Node: Exception Related Functions118758
873873++Node: Compatibility with MPF125576
874874++Node: Custom Interface128317
875875++Node: Internals132716
876876++Node: API Compatibility134260
877877++Node: Type and Macro Changes136189
878878++Node: Added Functions139038
879879++Node: Changed Functions142326
880880++Node: Removed Functions146739
881881++Node: Other Changes147167
882882++Node: Contributors148770
883883++Node: References151413
884884++Node: GNU Free Documentation License153167
885885++Node: Concept Index175760
886886++Node: Function and Type Index181857
887887+888888+ End Tag Table
889889+890890+diff -Naurd mpfr-3.1.3-a/src/lngamma.c mpfr-3.1.3-b/src/lngamma.c
891891+--- mpfr-3.1.3-a/src/lngamma.c 2015-06-19 19:55:10.000000000 +0000
892892++++ mpfr-3.1.3-b/src/lngamma.c 2015-07-02 10:49:24.018113593 +0000
893893+@@ -603,16 +603,17 @@
894894+ mpfr_get_prec (y), mpfr_log_prec, y, inex));
895895+896896+ /* special cases */
897897+- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
898898++ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x) ||
899899++ (MPFR_IS_NEG (x) && mpfr_integer_p (x))))
900900+ {
901901+- if (MPFR_IS_NAN (x) || MPFR_IS_NEG (x))
902902++ if (MPFR_IS_NAN (x))
903903+ {
904904+ MPFR_SET_NAN (y);
905905+ MPFR_RET_NAN;
906906+ }
907907+- else /* lngamma(+Inf) = lngamma(+0) = +Inf */
908908++ else /* lngamma(+/-Inf) = lngamma(nonpositive integer) = +Inf */
909909+ {
910910+- if (MPFR_IS_ZERO (x))
911911++ if (!MPFR_IS_INF (x))
912912+ mpfr_set_divby0 ();
913913+ MPFR_SET_INF (y);
914914+ MPFR_SET_POS (y);
915915+@@ -620,8 +621,8 @@
916916+ }
917917+ }
918918+919919+- /* if x < 0 and -2k-1 <= x <= -2k, then lngamma(x) = NaN */
920920+- if (MPFR_IS_NEG (x) && (unit_bit (x) == 0 || mpfr_integer_p (x)))
921921++ /* if -2k-1 < x < -2k <= 0, then lngamma(x) = NaN */
922922++ if (MPFR_IS_NEG (x) && unit_bit (x) == 0)
923923+ {
924924+ MPFR_SET_NAN (y);
925925+ MPFR_RET_NAN;
926926+diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
927927+--- mpfr-3.1.3-a/src/mpfr.h 2015-06-19 19:55:10.000000000 +0000
928928++++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
929929+@@ -27,7 +27,7 @@
930930+ #define MPFR_VERSION_MAJOR 3
931931+ #define MPFR_VERSION_MINOR 1
932932+ #define MPFR_VERSION_PATCHLEVEL 3
933933+-#define MPFR_VERSION_STRING "3.1.3"
934934++#define MPFR_VERSION_STRING "3.1.3-p1"
935935+936936+ /* Macros dealing with MPFR VERSION */
937937+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
938938+diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
939939+--- mpfr-3.1.3-a/src/version.c 2015-06-19 19:55:10.000000000 +0000
940940++++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:49:24.042113845 +0000
941941+@@ -25,5 +25,5 @@
942942+ const char *
943943+ mpfr_get_version (void)
944944+ {
945945+- return "3.1.3";
946946++ return "3.1.3-p1";
947947+ }
948948+diff -Naurd mpfr-3.1.3-a/tests/tlngamma.c mpfr-3.1.3-b/tests/tlngamma.c
949949+--- mpfr-3.1.3-a/tests/tlngamma.c 2015-06-19 19:55:10.000000000 +0000
950950++++ mpfr-3.1.3-b/tests/tlngamma.c 2015-07-02 10:49:24.018113593 +0000
951951+@@ -33,7 +33,7 @@
952952+ special (void)
953953+ {
954954+ mpfr_t x, y;
955955+- int inex;
956956++ int i, inex;
957957+958958+ mpfr_init (x);
959959+ mpfr_init (y);
960960+@@ -46,25 +46,29 @@
961961+ exit (1);
962962+ }
963963+964964+- mpfr_set_inf (x, -1);
965965++ mpfr_set_inf (x, 1);
966966++ mpfr_clear_flags ();
967967+ mpfr_lngamma (y, x, MPFR_RNDN);
968968+- if (!mpfr_nan_p (y))
969969++ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
970970+ {
971971+- printf ("Error for lngamma(-Inf)\n");
972972++ printf ("Error for lngamma(+Inf)\n");
973973+ exit (1);
974974+ }
975975+976976+- mpfr_set_inf (x, 1);
977977++ mpfr_set_inf (x, -1);
978978++ mpfr_clear_flags ();
979979+ mpfr_lngamma (y, x, MPFR_RNDN);
980980+- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
981981++ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
982982+ {
983983+- printf ("Error for lngamma(+Inf)\n");
984984++ printf ("Error for lngamma(-Inf)\n");
985985+ exit (1);
986986+ }
987987+988988+ mpfr_set_ui (x, 0, MPFR_RNDN);
989989++ mpfr_clear_flags ();
990990+ mpfr_lngamma (y, x, MPFR_RNDN);
991991+- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
992992++ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
993993++ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
994994+ {
995995+ printf ("Error for lngamma(+0)\n");
996996+ exit (1);
997997+@@ -72,32 +76,58 @@
998998+999999+ mpfr_set_ui (x, 0, MPFR_RNDN);
10001000+ mpfr_neg (x, x, MPFR_RNDN);
10011001++ mpfr_clear_flags ();
10021002+ mpfr_lngamma (y, x, MPFR_RNDN);
10031003+- if (!mpfr_nan_p (y))
10041004++ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
10051005++ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
10061006+ {
10071007+ printf ("Error for lngamma(-0)\n");
10081008+ exit (1);
10091009+ }
10101010+10111011+ mpfr_set_ui (x, 1, MPFR_RNDN);
10121012++ mpfr_clear_flags ();
10131013+ mpfr_lngamma (y, x, MPFR_RNDN);
10141014+- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
10151015++ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
10161016+ {
10171017+ printf ("Error for lngamma(1)\n");
10181018+ exit (1);
10191019+ }
10201020+10211021+- mpfr_set_si (x, -1, MPFR_RNDN);
10221022+- mpfr_lngamma (y, x, MPFR_RNDN);
10231023+- if (!mpfr_nan_p (y))
10241024++ for (i = 1; i <= 5; i++)
10251025+ {
10261026+- printf ("Error for lngamma(-1)\n");
10271027+- exit (1);
10281028++ int c;
10291029++
10301030++ mpfr_set_si (x, -i, MPFR_RNDN);
10311031++ mpfr_clear_flags ();
10321032++ mpfr_lngamma (y, x, MPFR_RNDN);
10331033++ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
10341034++ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
10351035++ {
10361036++ printf ("Error for lngamma(-%d)\n", i);
10371037++ exit (1);
10381038++ }
10391039++ if (i & 1)
10401040++ {
10411041++ mpfr_nextabove (x);
10421042++ c = '+';
10431043++ }
10441044++ else
10451045++ {
10461046++ mpfr_nextbelow (x);
10471047++ c = '-';
10481048++ }
10491049++ mpfr_lngamma (y, x, MPFR_RNDN);
10501050++ if (!mpfr_nan_p (y))
10511051++ {
10521052++ printf ("Error for lngamma(-%d%cepsilon)\n", i, c);
10531053++ exit (1);
10541054++ }
10551055+ }
10561056+10571057+ mpfr_set_ui (x, 2, MPFR_RNDN);
10581058+ mpfr_lngamma (y, x, MPFR_RNDN);
10591059+- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
10601060++ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
10611061+ {
10621062+ printf ("Error for lngamma(2)\n");
10631063+ exit (1);
10641064+@@ -127,7 +157,7 @@
10651065+ mpfr_set_str (x, CHECK_X2, 10, MPFR_RNDN);
10661066+ mpfr_lngamma (y, x, MPFR_RNDN);
10671067+ mpfr_set_str (x, CHECK_Y2, 10, MPFR_RNDN);
10681068+- if (MPFR_IS_NAN (y) || mpfr_cmp (y, x))
10691069++ if (mpfr_cmp0 (y, x))
10701070+ {
10711071+ printf ("mpfr_lngamma("CHECK_X2") is wrong:\n"
10721072+ "expected ");
10731073+@@ -143,7 +173,7 @@
10741074+ mpfr_lngamma (y, x, MPFR_RNDU);
10751075+ mpfr_set_prec (x, 175);
10761076+ mpfr_set_str_binary (x, "0.1010001100011101101011001101110010100001000001000001110011000001101100001111001001000101011011100100010101011110100111110101010100010011010010000101010111001100011000101111E7");
10771077+- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
10781078++ if (mpfr_cmp0 (x, y))
10791079+ {
10801080+ printf ("Error in mpfr_lngamma (1)\n");
10811081+ exit (1);
10821082+@@ -155,7 +185,7 @@
10831083+ mpfr_lngamma (x, y, MPFR_RNDZ);
10841084+ mpfr_set_prec (y, 21);
10851085+ mpfr_set_str_binary (y, "0.111000101000001100101E9");
10861086+- if (MPFR_IS_NAN (x) || mpfr_cmp (x, y))
10871087++ if (mpfr_cmp0 (x, y))
10881088+ {
10891089+ printf ("Error in mpfr_lngamma (120)\n");
10901090+ printf ("Expected "); mpfr_print_binary (y); puts ("");
10911091+@@ -169,7 +199,7 @@
10921092+ inex = mpfr_lngamma (y, x, MPFR_RNDN);
10931093+ mpfr_set_prec (x, 206);
10941094+ mpfr_set_str_binary (x, "0.10000111011000000011100010101001100110001110000111100011000100100110110010001011011110101001111011110110000001010100111011010000000011100110110101100111000111010011110010000100010111101010001101000110101001E13");
10951095+- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
10961096++ if (mpfr_cmp0 (x, y))
10971097+ {
10981098+ printf ("Error in mpfr_lngamma (768)\n");
10991099+ exit (1);
11001100+@@ -185,7 +215,7 @@
11011101+ mpfr_set_str_binary (x, "0.1100E-66");
11021102+ mpfr_lngamma (y, x, MPFR_RNDN);
11031103+ mpfr_set_str_binary (x, "0.1100E6");
11041104+- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
11051105++ if (mpfr_cmp0 (x, y))
11061106+ {
11071107+ printf ("Error for lngamma(0.1100E-66)\n");
11081108+ exit (1);
11091109+@@ -199,7 +229,7 @@
11101110+ mpfr_lngamma (y, x, MPFR_RNDN);
11111111+ mpfr_set_prec (x, 32);
11121112+ mpfr_set_str_binary (x, "-0.10001000111011111011000010100010E207");
11131113+- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
11141114++ if (mpfr_cmp0 (x, y))
11151115+ {
11161116+ printf ("Error for lngamma(-2^199+0.5)\n");
11171117+ printf ("Got ");
11181118+diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
11191119+--- mpfr-3.1.3-a/PATCHES 2015-07-02 10:50:08.046573308 +0000
11201120++++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:50:08.126574142 +0000
11211121+@@ -0,0 +1 @@
11221122++muldiv-2exp-overflow
11231123+diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
11241124+--- mpfr-3.1.3-a/VERSION 2015-07-02 10:49:24.042113845 +0000
11251125++++ mpfr-3.1.3-b/VERSION 2015-07-02 10:50:08.126574142 +0000
11261126+@@ -1 +1 @@
11271127+-3.1.3-p1
11281128++3.1.3-p2
11291129+diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
11301130+--- mpfr-3.1.3-a/src/div_2si.c 2015-06-19 19:55:10.000000000 +0000
11311131++++ mpfr-3.1.3-b/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
11321132+@@ -49,7 +49,7 @@
11331133+ rnd_mode = MPFR_RNDZ;
11341134+ return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
11351135+ }
11361136+- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
11371137++ else if (MPFR_UNLIKELY(n <= 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
11381138+ exp > __gmpfr_emax + n)) )
11391139+ return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
11401140+11411141+diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
11421142+--- mpfr-3.1.3-a/src/div_2ui.c 2015-06-19 19:55:10.000000000 +0000
11431143++++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
11441144+@@ -32,7 +32,7 @@
11451145+ rnd_mode),
11461146+ ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inexact));
11471147+11481148+- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
11491149++ if (MPFR_UNLIKELY (n == 0 || MPFR_IS_SINGULAR (x)))
11501150+ return mpfr_set (y, x, rnd_mode);
11511151+ else
11521152+ {
11531153+diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
11541154+--- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
11551155++++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
11561156+@@ -27,7 +27,7 @@
11571157+ #define MPFR_VERSION_MAJOR 3
11581158+ #define MPFR_VERSION_MINOR 1
11591159+ #define MPFR_VERSION_PATCHLEVEL 3
11601160+-#define MPFR_VERSION_STRING "3.1.3-p1"
11611161++#define MPFR_VERSION_STRING "3.1.3-p2"
11621162+11631163+ /* Macros dealing with MPFR VERSION */
11641164+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
11651165+diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
11661166+--- mpfr-3.1.3-a/src/mul_2si.c 2015-06-19 19:55:10.000000000 +0000
11671167++++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
11681168+@@ -39,7 +39,7 @@
11691169+ {
11701170+ mpfr_exp_t exp = MPFR_GET_EXP (x);
11711171+ MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
11721172+- if (MPFR_UNLIKELY( n > 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
11731173++ if (MPFR_UNLIKELY(n >= 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
11741174+ exp > __gmpfr_emax - n)))
11751175+ return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
11761176+ else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emin > MPFR_EMAX_MAX + n ||
11771177+diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
11781178+--- mpfr-3.1.3-a/src/version.c 2015-07-02 10:49:24.042113845 +0000
11791179++++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:50:08.126574142 +0000
11801180+@@ -25,5 +25,5 @@
11811181+ const char *
11821182+ mpfr_get_version (void)
11831183+ {
11841184+- return "3.1.3-p1";
11851185++ return "3.1.3-p2";
11861186+ }
11871187+diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
11881188+--- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-06-19 19:55:10.000000000 +0000
11891189++++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
11901190+@@ -242,6 +242,76 @@
11911191+ large (MPFR_EMAX_MAX);
11921192+ }
11931193+11941194++/* Cases where the function overflows on n = 0 when rounding is like
11951195++ away from zero. */
11961196++static void
11971197++overflow0 (mpfr_exp_t emax)
11981198++{
11991199++ mpfr_exp_t old_emax;
12001200++ mpfr_t x, y1, y2;
12011201++ int neg, r, op;
12021202++ static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" };
12031203++
12041204++ old_emax = mpfr_get_emax ();
12051205++ set_emax (emax);
12061206++
12071207++ mpfr_init2 (x, 8);
12081208++ mpfr_inits2 (6, y1, y2, (mpfr_ptr) 0);
12091209++
12101210++ mpfr_set_inf (x, 1);
12111211++ mpfr_nextbelow (x);
12121212++
12131213++ for (neg = 0; neg <= 1; neg++)
12141214++ {
12151215++ RND_LOOP (r)
12161216++ {
12171217++ int inex1, inex2;
12181218++ unsigned int flags1, flags2;
12191219++
12201220++ /* Even if there isn't an overflow (rounding ~ toward zero),
12211221++ the result is the same as the one of an overflow. */
12221222++ inex1 = mpfr_overflow (y1, (mpfr_rnd_t) r, neg ? -1 : 1);
12231223++ flags1 = MPFR_FLAGS_INEXACT;
12241224++ if (mpfr_inf_p (y1))
12251225++ flags1 |= MPFR_FLAGS_OVERFLOW;
12261226++ for (op = 0; op < 4; op++)
12271227++ {
12281228++ mpfr_clear_flags ();
12291229++ inex2 =
12301230++ op == 0 ? mpfr_mul_2ui (y2, x, 0, (mpfr_rnd_t) r) :
12311231++ op == 1 ? mpfr_mul_2si (y2, x, 0, (mpfr_rnd_t) r) :
12321232++ op == 2 ? mpfr_div_2ui (y2, x, 0, (mpfr_rnd_t) r) :
12331233++ op == 3 ? mpfr_div_2si (y2, x, 0, (mpfr_rnd_t) r) :
12341234++ (MPFR_ASSERTN (0), 0);
12351235++ flags2 = __gmpfr_flags;
12361236++ if (!(mpfr_equal_p (y1, y2) &&
12371237++ SAME_SIGN (inex1, inex2) &&
12381238++ flags1 == flags2))
12391239++ {
12401240++ printf ("Error in overflow0 for %s, mpfr_%s, emax = %"
12411241++ MPFR_EXP_FSPEC "d,\nx = ",
12421242++ mpfr_print_rnd_mode ((mpfr_rnd_t) r), sop[op],
12431243++ (mpfr_eexp_t) emax);
12441244++ mpfr_dump (x);
12451245++ printf ("Expected ");
12461246++ mpfr_dump (y1);
12471247++ printf (" with inex = %d, flags =", inex1);
12481248++ flags_out (flags1);
12491249++ printf ("Got ");
12501250++ mpfr_dump (y2);
12511251++ printf (" with inex = %d, flags =", inex2);
12521252++ flags_out (flags2);
12531253++ exit (1);
12541254++ }
12551255++ }
12561256++ }
12571257++ mpfr_neg (x, x, MPFR_RNDN);
12581258++ }
12591259++
12601260++ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
12611261++ set_emax (old_emax);
12621262++}
12631263++
12641264+ int
12651265+ main (int argc, char *argv[])
12661266+ {
12671267+@@ -334,6 +404,11 @@
12681268+ underflow0 ();
12691269+ large0 ();
12701270+12711271++ if (mpfr_get_emax () != MPFR_EMAX_MAX)
12721272++ overflow0 (mpfr_get_emax ());
12731273++ overflow0 (MPFR_EMAX_MAX);
12741274++ overflow0 (-1);
12751275++
12761276+ tests_end_mpfr ();
12771277+ return 0;
12781278+ }
12791279+diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
12801280+--- mpfr-3.1.3-a/PATCHES 2015-07-17 08:54:48.592799981 +0000
12811281++++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:54:48.616811495 +0000
12821282+@@ -0,0 +1 @@
12831283++muldiv-2exp-underflow
12841284+diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
12851285+--- mpfr-3.1.3-a/VERSION 2015-07-02 10:50:08.126574142 +0000
12861286++++ mpfr-3.1.3-b/VERSION 2015-07-17 08:54:48.616811495 +0000
12871287+@@ -1 +1 @@
12881288+-3.1.3-p2
12891289++3.1.3-p3
12901290+diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
12911291+--- mpfr-3.1.3-a/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
12921292++++ mpfr-3.1.3-b/src/div_2si.c 2015-07-17 08:54:48.608807656 +0000
12931293+@@ -45,7 +45,8 @@
12941294+ if (rnd_mode == MPFR_RNDN &&
12951295+ (__gmpfr_emin > MPFR_EMAX_MAX - (n - 1) ||
12961296+ exp < __gmpfr_emin + (n - 1) ||
12971297+- (inexact >= 0 && mpfr_powerof2_raw (y))))
12981298++ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
12991299++ mpfr_powerof2_raw (y))))
13001300+ rnd_mode = MPFR_RNDZ;
13011301+ return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
13021302+ }
13031303+diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
13041304+--- mpfr-3.1.3-a/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
13051305++++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-17 08:54:48.608807656 +0000
13061306+@@ -44,7 +44,9 @@
13071307+ if (MPFR_UNLIKELY (n >= diffexp)) /* exp - n <= emin - 1 */
13081308+ {
13091309+ if (rnd_mode == MPFR_RNDN &&
13101310+- (n > diffexp || (inexact >= 0 && mpfr_powerof2_raw (y))))
13111311++ (n > diffexp ||
13121312++ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
13131313++ mpfr_powerof2_raw (y))))
13141314+ rnd_mode = MPFR_RNDZ;
13151315+ return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y));
13161316+ }
13171317+diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
13181318+--- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
13191319++++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
13201320+@@ -27,7 +27,7 @@
13211321+ #define MPFR_VERSION_MAJOR 3
13221322+ #define MPFR_VERSION_MINOR 1
13231323+ #define MPFR_VERSION_PATCHLEVEL 3
13241324+-#define MPFR_VERSION_STRING "3.1.3-p2"
13251325++#define MPFR_VERSION_STRING "3.1.3-p3"
13261326+13271327+ /* Macros dealing with MPFR VERSION */
13281328+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
13291329+diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
13301330+--- mpfr-3.1.3-a/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
13311331++++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-17 08:54:48.608807656 +0000
13321332+@@ -48,7 +48,8 @@
13331333+ if (rnd_mode == MPFR_RNDN &&
13341334+ (__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) ||
13351335+ exp < __gmpfr_emin - (n + 1) ||
13361336+- (inexact >= 0 && mpfr_powerof2_raw (y))))
13371337++ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
13381338++ mpfr_powerof2_raw (y))))
13391339+ rnd_mode = MPFR_RNDZ;
13401340+ return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
13411341+ }
13421342+diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
13431343+--- mpfr-3.1.3-a/src/version.c 2015-07-02 10:50:08.126574142 +0000
13441344++++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:54:48.616811495 +0000
13451345+@@ -25,5 +25,5 @@
13461346+ const char *
13471347+ mpfr_get_version (void)
13481348+ {
13491349+- return "3.1.3-p2";
13501350++ return "3.1.3-p3";
13511351+ }
13521352+diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
13531353+--- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
13541354++++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-17 08:54:48.608807656 +0000
13551355+@@ -50,77 +50,82 @@
13561356+ {
13571357+ mpfr_t x, y, z1, z2;
13581358+ mpfr_exp_t emin;
13591359+- int i, k;
13601360++ int i, k, s;
13611361+ int prec;
13621362+ int rnd;
13631363+ int div;
13641364+ int inex1, inex2;
13651365+ unsigned int flags1, flags2;
13661366+13671367+- /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e)
13681368+- * with emin = e, x = 1 + i/16, i in { -1, 0, 1 }, and k = 1 to 4,
13691369+- * by comparing the result with the one of a simple division.
13701370++ /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e) with
13711371++ * emin = e, x = s * (1 + i/16), i in { -1, 0, 1 }, s in { -1, 1 }, and
13721372++ * k = 1 to 4, by comparing the result with the one of a simple division.
13731373+ */
13741374+ emin = mpfr_get_emin ();
13751375+ set_emin (e);
13761376+ mpfr_inits2 (8, x, y, (mpfr_ptr) 0);
13771377+ for (i = 15; i <= 17; i++)
13781378+- {
13791379+- inex1 = mpfr_set_ui_2exp (x, i, -4, MPFR_RNDN);
13801380+- MPFR_ASSERTN (inex1 == 0);
13811381+- for (prec = 6; prec >= 3; prec -= 3)
13821382+- {
13831383+- mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
13841384+- RND_LOOP (rnd)
13851385+- for (k = 1; k <= 4; k++)
13861386+- {
13871387+- /* The following one is assumed to be correct. */
13881388+- inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
13891389+- MPFR_ASSERTN (inex1 == 0);
13901390+- inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
13911391+- MPFR_ASSERTN (inex1 == 0);
13921392+- mpfr_clear_flags ();
13931393+- /* Do not use mpfr_div_ui to avoid the optimization
13941394+- by mpfr_div_2si. */
13951395+- inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
13961396+- flags1 = __gmpfr_flags;
13971397+-
13981398+- for (div = 0; div <= 2; div++)
13991399++ for (s = 1; s >= -1; s -= 2)
14001400++ {
14011401++ inex1 = mpfr_set_si_2exp (x, s * i, -4, MPFR_RNDN);
14021402++ MPFR_ASSERTN (inex1 == 0);
14031403++ for (prec = 6; prec >= 3; prec -= 3)
14041404++ {
14051405++ mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
14061406++ RND_LOOP (rnd)
14071407++ for (k = 1; k <= 4; k++)
14081408+ {
14091409++ /* The following one is assumed to be correct. */
14101410++ inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
14111411++ MPFR_ASSERTN (inex1 == 0);
14121412++ inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
14131413++ MPFR_ASSERTN (inex1 == 0);
14141414+ mpfr_clear_flags ();
14151415+- inex2 = div == 0 ?
14161416+- mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : div == 1 ?
14171417+- mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
14181418+- mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
14191419+- flags2 = __gmpfr_flags;
14201420+- if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
14211421+- mpfr_equal_p (z1, z2))
14221422+- continue;
14231423+- printf ("Error in underflow(");
14241424+- if (e == MPFR_EMIN_MIN)
14251425+- printf ("MPFR_EMIN_MIN");
14261426+- else if (e == emin)
14271427+- printf ("default emin");
14281428+- else if (e >= LONG_MIN)
14291429+- printf ("%ld", (long) e);
14301430+- else
14311431+- printf ("<LONG_MIN");
14321432+- printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d, "
14331433+- "%s\n", div == 0 ? "mul_2si" : div == 1 ?
14341434+- "div_2si" : "div_2ui", i, prec, k,
14351435+- mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
14361436+- printf ("Expected ");
14371437+- mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
14381438+- printf (", inex = %d, flags = %u\n", SIGN (inex1), flags1);
14391439+- printf ("Got ");
14401440+- mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
14411441+- printf (", inex = %d, flags = %u\n", SIGN (inex2), flags2);
14421442+- exit (1);
14431443+- } /* div */
14441444+- } /* k */
14451445+- mpfr_clears (z1, z2, (mpfr_ptr) 0);
14461446+- } /* prec */
14471447+- } /* i */
14481448++ /* Do not use mpfr_div_ui to avoid the optimization
14491449++ by mpfr_div_2si. */
14501450++ inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
14511451++ flags1 = __gmpfr_flags;
14521452++
14531453++ for (div = 0; div <= 2; div++)
14541454++ {
14551455++ mpfr_clear_flags ();
14561456++ inex2 =
14571457++ div == 0 ?
14581458++ mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) :
14591459++ div == 1 ?
14601460++ mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
14611461++ mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
14621462++ flags2 = __gmpfr_flags;
14631463++ if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
14641464++ mpfr_equal_p (z1, z2))
14651465++ continue;
14661466++ printf ("Error in underflow(");
14671467++ if (e == MPFR_EMIN_MIN)
14681468++ printf ("MPFR_EMIN_MIN");
14691469++ else if (e == emin)
14701470++ printf ("default emin");
14711471++ else if (e >= LONG_MIN)
14721472++ printf ("%ld", (long) e);
14731473++ else
14741474++ printf ("<LONG_MIN");
14751475++ printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d,"
14761476++ " %s\n", div == 0 ? "mul_2si" : div == 1 ?
14771477++ "div_2si" : "div_2ui", s * i, prec, k,
14781478++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
14791479++ printf ("Expected ");
14801480++ mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
14811481++ printf (", inex = %d, flags = %u\n",
14821482++ SIGN (inex1), flags1);
14831483++ printf ("Got ");
14841484++ mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
14851485++ printf (", inex = %d, flags = %u\n",
14861486++ SIGN (inex2), flags2);
14871487++ exit (1);
14881488++ } /* div */
14891489++ } /* k */
14901490++ mpfr_clears (z1, z2, (mpfr_ptr) 0);
14911491++ } /* prec */
14921492++ } /* i */
14931493+ mpfr_clears (x, y, (mpfr_ptr) 0);
14941494+ set_emin (emin);
14951495+ }
14961496+diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
14971497+--- mpfr-3.1.3-a/PATCHES 2015-07-17 08:58:21.094987384 +0000
14981498++++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:58:21.118986898 +0000
14991499+@@ -0,0 +1 @@
15001500++frexp
15011501+diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
15021502+--- mpfr-3.1.3-a/VERSION 2015-07-17 08:54:48.616811495 +0000
15031503++++ mpfr-3.1.3-b/VERSION 2015-07-17 08:58:21.118986898 +0000
15041504+@@ -1 +1 @@
15051505+-3.1.3-p3
15061506++3.1.3-p4
15071507+diff -Naurd mpfr-3.1.3-a/src/frexp.c mpfr-3.1.3-b/src/frexp.c
15081508+--- mpfr-3.1.3-a/src/frexp.c 2015-06-19 19:55:09.000000000 +0000
15091509++++ mpfr-3.1.3-b/src/frexp.c 2015-07-17 08:58:21.106987142 +0000
15101510+@@ -26,6 +26,13 @@
15111511+ mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
15121512+ {
15131513+ int inex;
15141514++ unsigned int saved_flags = __gmpfr_flags;
15151515++ MPFR_BLOCK_DECL (flags);
15161516++
15171517++ MPFR_LOG_FUNC
15181518++ (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec (x), mpfr_log_prec, x, rnd),
15191519++ ("y[%Pu]=%.*Rg exp=%" MPFR_EXP_FSPEC "d inex=%d", mpfr_get_prec (y),
15201520++ mpfr_log_prec, y, (mpfr_eexp_t) *exp, inex));
15211521+15221522+ if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)))
15231523+ {
15241524+@@ -49,8 +56,32 @@
15251525+ }
15261526+ }
15271527+15281528+- inex = mpfr_set (y, x, rnd);
15291529++ MPFR_BLOCK (flags, inex = mpfr_set (y, x, rnd));
15301530++ __gmpfr_flags = saved_flags;
15311531++
15321532++ /* Possible overflow due to the rounding, no possible underflow. */
15331533++
15341534++ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags)))
15351535++ {
15361536++ int inex2;
15371537++
15381538++ /* An overflow here means that the exponent of y would be larger than
15391539++ the one of x, thus x would be rounded to the next power of 2, and
15401540++ the returned y should be 1/2 in absolute value, rounded (i.e. with
15411541++ possible underflow or overflow). This also implies that x and y are
15421542++ different objects, so that the exponent of x has not been lost. */
15431543++ MPFR_LOG_MSG (("Internal overflow\n", 0));
15441544++ MPFR_ASSERTD (x != y);
15451545++ *exp = MPFR_GET_EXP (x) + 1;
15461546++ inex2 = mpfr_set_si_2exp (y, MPFR_INT_SIGN (x), -1, rnd);
15471547++ MPFR_LOG_MSG (("inex=%d inex2=%d\n", inex, inex2));
15481548++ if (inex2 != 0)
15491549++ inex = inex2;
15501550++ MPFR_RET (inex);
15511551++ }
15521552++
15531553+ *exp = MPFR_GET_EXP (y);
15541554+- MPFR_SET_EXP (y, 0);
15551555++ /* Do not use MPFR_SET_EXP because the range has not been checked yet. */
15561556++ MPFR_EXP (y) = 0;
15571557+ return mpfr_check_range (y, inex, rnd);
15581558+ }
15591559+diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
15601560+--- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
15611561++++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000
15621562+@@ -27,7 +27,7 @@
15631563+ #define MPFR_VERSION_MAJOR 3
15641564+ #define MPFR_VERSION_MINOR 1
15651565+ #define MPFR_VERSION_PATCHLEVEL 3
15661566+-#define MPFR_VERSION_STRING "3.1.3-p3"
15671567++#define MPFR_VERSION_STRING "3.1.3-p4"
15681568+15691569+ /* Macros dealing with MPFR VERSION */
15701570+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
15711571+diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
15721572+--- mpfr-3.1.3-a/src/version.c 2015-07-17 08:54:48.616811495 +0000
15731573++++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:58:21.118986898 +0000
15741574+@@ -25,5 +25,5 @@
15751575+ const char *
15761576+ mpfr_get_version (void)
15771577+ {
15781578+- return "3.1.3-p3";
15791579++ return "3.1.3-p4";
15801580+ }
15811581+diff -Naurd mpfr-3.1.3-a/tests/tfrexp.c mpfr-3.1.3-b/tests/tfrexp.c
15821582+--- mpfr-3.1.3-a/tests/tfrexp.c 2015-06-19 19:55:10.000000000 +0000
15831583++++ mpfr-3.1.3-b/tests/tfrexp.c 2015-07-17 08:58:21.106987142 +0000
15841584+@@ -129,12 +129,115 @@
15851585+ mpfr_clear (x);
15861586+ }
15871587+15881588++static void check1 (void)
15891589++{
15901590++ mpfr_exp_t emin, emax, e;
15911591++ mpfr_t x, y1, y2;
15921592++ int r, neg, red;
15931593++
15941594++ emin = mpfr_get_emin ();
15951595++ emax = mpfr_get_emax ();
15961596++ set_emin (MPFR_EMIN_MIN);
15971597++ set_emax (MPFR_EMAX_MAX);
15981598++
15991599++ mpfr_init2 (x, 7);
16001600++ mpfr_inits2 (4, y1, y2, (mpfr_ptr) 0);
16011601++
16021602++ mpfr_set_ui_2exp (x, 1, -2, MPFR_RNDN);
16031603++ while (mpfr_regular_p (x))
16041604++ {
16051605++ /* Test the exponents up to 3 and with the maximum exponent
16061606++ (to check potential intermediate overflow). */
16071607++ if (MPFR_GET_EXP (x) == 4)
16081608++ mpfr_set_exp (x, MPFR_EMAX_MAX);
16091609++ e = MPFR_GET_EXP (x);
16101610++ for (neg = 0; neg < 2; neg++)
16111611++ {
16121612++ RND_LOOP (r)
16131613++ {
16141614++ int inex1, inex2;
16151615++ mpfr_exp_t e1, e2;
16161616++ unsigned int flags1, flags2;
16171617++
16181618++ for (red = 0; red < 2; red++)
16191619++ {
16201620++ if (red)
16211621++ {
16221622++ /* e1: exponent of the rounded value of x. */
16231623++ MPFR_ASSERTN (e1 == e || e1 == e + 1);
16241624++ set_emin (e);
16251625++ set_emax (e);
16261626++ mpfr_clear_flags ();
16271627++ inex1 = e1 < 0 ?
16281628++ mpfr_mul_2ui (y1, x, -e1, (mpfr_rnd_t) r) :
16291629++ mpfr_div_2ui (y1, x, e1, (mpfr_rnd_t) r);
16301630++ flags1 = __gmpfr_flags;
16311631++ }
16321632++ else
16331633++ {
16341634++ inex1 = mpfr_set (y1, x, (mpfr_rnd_t) r);
16351635++ e1 = MPFR_IS_INF (y1) ? e + 1 : MPFR_GET_EXP (y1);
16361636++ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0;
16371637++ }
16381638++ mpfr_clear_flags ();
16391639++ inex2 = mpfr_frexp (&e2, y2, x, (mpfr_rnd_t) r);
16401640++ flags2 = __gmpfr_flags;
16411641++ set_emin (MPFR_EMIN_MIN);
16421642++ set_emax (MPFR_EMAX_MAX);
16431643++ if ((!red || e == 0) &&
16441644++ (! mpfr_regular_p (y2) || MPFR_GET_EXP (y2) != 0))
16451645++ {
16461646++ printf ("Error in check1 for %s, red = %d, x = ",
16471647++ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
16481648++ mpfr_dump (x);
16491649++ printf ("Expected 1/2 <= |y| < 1, got y = ");
16501650++ mpfr_dump (y2);
16511651++ exit (1);
16521652++ }
16531653++ if (!red)
16541654++ {
16551655++ if (e2 > 0)
16561656++ mpfr_mul_2ui (y2, y2, e2, MPFR_RNDN);
16571657++ else if (e2 < 0)
16581658++ mpfr_div_2ui (y2, y2, -e2, MPFR_RNDN);
16591659++ }
16601660++ if (! (SAME_SIGN (inex1, inex2) &&
16611661++ mpfr_equal_p (y1, y2) &&
16621662++ flags1 == flags2))
16631663++ {
16641664++ printf ("Error in check1 for %s, red = %d, x = ",
16651665++ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
16661666++ mpfr_dump (x);
16671667++ printf ("Expected y1 = ");
16681668++ mpfr_dump (y1);
16691669++ printf ("Got y2 = ");
16701670++ mpfr_dump (y2);
16711671++ printf ("Expected inex ~= %d, got %d\n", inex1, inex2);
16721672++ printf ("Expected flags:");
16731673++ flags_out (flags1);
16741674++ printf ("Got flags: ");
16751675++ flags_out (flags2);
16761676++ exit (1);
16771677++ }
16781678++ }
16791679++ }
16801680++ mpfr_neg (x, x, MPFR_RNDN);
16811681++ }
16821682++ mpfr_nextabove (x);
16831683++ }
16841684++
16851685++ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
16861686++ set_emin (emin);
16871687++ set_emax (emax);
16881688++}
16891689++
16901690+ int
16911691+ main (int argc, char *argv[])
16921692+ {
16931693+ tests_start_mpfr ();
16941694+16951695+ check_special ();
16961696++ check1 ();
16971697+16981698+ tests_end_mpfr ();
16991699+ return 0;
+2-2
pkgs/development/libraries/nghttp2/default.nix
···3434in
3535stdenv.mkDerivation rec {
3636 name = "${prefix}nghttp2-${version}";
3737- version = "1.0.2";
3737+ version = "1.1.1";
38383939 # Don't use fetchFromGitHub since this needs a bootstrap curl
4040 src = fetchurl {
4141 url = "http://pub.wak.io/nixos/tarballs/nghttp2-${version}.tar.bz2";
4242- sha256 = "633dd6d5d1f29a4d802d6c9e5b9eeb0b9104f35652396f26999a27515b6c1c14";
4242+ sha256 = "9659e8598c8481f1bf8e63ba4f828f5283053df62a51fa8324cb55ea7a51b80c";
4343 };
44444545 # Configure script searches for a symbol which does not exist in jemalloc on Darwin
+2-2
pkgs/development/libraries/poppler/default.nix
···55}:
6677let # beware: updates often break cups_filters build
88- version = "0.32.0"; # even major numbers are stable
99- sha256 = "162vfbvbz0frvqyk00ldsbl49h4bj8i8wn0ngfl30xg1lldy6qs9";
88+ version = "0.34.0"; # even major numbers are stable
99+ sha256 = "1c2wa4pfzqmvzq1jpp3ps5nmzz745gcg8dnpwqpfdccy5ydbm90v";
1010in
1111stdenv.mkDerivation rec {
1212 name = "poppler-${suffix}-${version}";