1 diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
2 --- mpfr-2.4.1-a/PATCHES 2009-02-20 09:43:17.000000000 +0000
3 +++ mpfr-2.4.1-b/PATCHES 2009-02-27 16:56:29.000000000 +0000
6 diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
7 --- mpfr-2.4.1-a/VERSION 2009-02-25 16:16:08.000000000 +0000
8 +++ mpfr-2.4.1-b/VERSION 2009-02-27 16:55:37.000000000 +0000
12 diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
13 --- mpfr-2.4.1-a/mpfr.h 2009-02-25 16:16:08.000000000 +0000
14 +++ mpfr-2.4.1-b/mpfr.h 2009-02-27 16:55:38.000000000 +0000
16 #define MPFR_VERSION_MAJOR 2
17 #define MPFR_VERSION_MINOR 4
18 #define MPFR_VERSION_PATCHLEVEL 1
19 -#define MPFR_VERSION_STRING "2.4.1"
20 +#define MPFR_VERSION_STRING "2.4.1-p1"
22 /* Macros dealing with MPFR VERSION */
23 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
24 diff -Naurd mpfr-2.4.1-a/rem1.c mpfr-2.4.1-b/rem1.c
25 --- mpfr-2.4.1-a/rem1.c 2009-02-20 09:43:17.000000000 +0000
26 +++ mpfr-2.4.1-b/rem1.c 2009-02-27 16:55:15.000000000 +0000
30 if (mpz_cmp_ui (r, 0) == 0)
31 - inex = mpfr_set_ui (rem, 0, GMP_RNDN);
33 + inex = mpfr_set_ui (rem, 0, GMP_RNDN);
34 + /* take into account sign of x */
36 + mpfr_neg (rem, rem, GMP_RNDN);
40 if (rnd_q == GMP_RNDN)
45 + /* take into account sign of x */
48 inex = mpfr_set_z (rem, r, rnd);
49 /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */
50 MPFR_EXP (rem) += (ex > ey) ? ey : ex;
55 - /* take into account sign of x */
58 - mpfr_neg (rem, rem, GMP_RNDN);
65 diff -Naurd mpfr-2.4.1-a/tests/tremquo.c mpfr-2.4.1-b/tests/tremquo.c
66 --- mpfr-2.4.1-a/tests/tremquo.c 2009-02-20 09:43:15.000000000 +0000
67 +++ mpfr-2.4.1-b/tests/tremquo.c 2009-02-27 16:55:15.000000000 +0000
70 #include "mpfr-test.h"
75 + mpfr_t x, y, r1, r2;
78 + mpfr_init2 (x, 118);
79 + mpfr_init2 (y, 181);
80 + mpfr_init2 (r1, 140);
81 + mpfr_init2 (r2, 140);
82 + mpfr_set_si (x, -1, GMP_RNDN);
83 + mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010");
84 + inex1 = mpfr_remainder (r1, x, y, GMP_RNDU);
85 + /* since the quotient is -1, r1 is the rounding of x+y */
86 + inex2 = mpfr_add (r2, x, y, GMP_RNDU);
87 + if (mpfr_cmp (r1, r2))
89 + printf ("Error in mpfr_remainder (bug20090227)\n");
90 + printf ("Expected ");
103 main (int argc, char *argv[])
114 diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
115 --- mpfr-2.4.1-a/version.c 2009-02-25 16:16:08.000000000 +0000
116 +++ mpfr-2.4.1-b/version.c 2009-02-27 16:55:38.000000000 +0000
119 mpfr_get_version (void)