1 Submitted By: Jim Gifford (jim at cross-lfs dot org)
3 Initial Package Version: 2.4.1
6 Description: See http://www.mpfr.org Website Under Bugs
8 diff -Naur mpfr-2.4.1.orig/mpfr.h mpfr-2.4.1/mpfr.h
9 --- mpfr-2.4.1.orig/mpfr.h 2009-02-25 08:16:08.000000000 -0800
10 +++ mpfr-2.4.1/mpfr.h 2009-02-28 15:22:16.554489175 -0800
12 #define MPFR_VERSION_MAJOR 2
13 #define MPFR_VERSION_MINOR 4
14 #define MPFR_VERSION_PATCHLEVEL 1
15 -#define MPFR_VERSION_STRING "2.4.1"
16 +#define MPFR_VERSION_STRING "2.4.1-p1"
18 /* Macros dealing with MPFR VERSION */
19 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
20 diff -Naur mpfr-2.4.1.orig/PATCHES mpfr-2.4.1/PATCHES
21 --- mpfr-2.4.1.orig/PATCHES 2009-02-20 01:43:17.000000000 -0800
22 +++ mpfr-2.4.1/PATCHES 2009-02-28 15:22:16.554489175 -0800
25 diff -Naur mpfr-2.4.1.orig/rem1.c mpfr-2.4.1/rem1.c
26 --- mpfr-2.4.1.orig/rem1.c 2009-02-20 01:43:17.000000000 -0800
27 +++ mpfr-2.4.1/rem1.c 2009-02-28 15:22:16.554489175 -0800
31 if (mpz_cmp_ui (r, 0) == 0)
32 - inex = mpfr_set_ui (rem, 0, GMP_RNDN);
34 + inex = mpfr_set_ui (rem, 0, GMP_RNDN);
35 + /* take into account sign of x */
37 + mpfr_neg (rem, rem, GMP_RNDN);
41 if (rnd_q == GMP_RNDN)
46 + /* take into account sign of x */
49 inex = mpfr_set_z (rem, r, rnd);
50 /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */
51 MPFR_EXP (rem) += (ex > ey) ? ey : ex;
56 - /* take into account sign of x */
59 - mpfr_neg (rem, rem, GMP_RNDN);
66 diff -Naur mpfr-2.4.1.orig/tests/tremquo.c mpfr-2.4.1/tests/tremquo.c
67 --- mpfr-2.4.1.orig/tests/tremquo.c 2009-02-20 01:43:15.000000000 -0800
68 +++ mpfr-2.4.1/tests/tremquo.c 2009-02-28 15:22:16.554489175 -0800
71 #include "mpfr-test.h"
76 + mpfr_t x, y, r1, r2;
79 + mpfr_init2 (x, 118);
80 + mpfr_init2 (y, 181);
81 + mpfr_init2 (r1, 140);
82 + mpfr_init2 (r2, 140);
83 + mpfr_set_si (x, -1, GMP_RNDN);
84 + mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010");
85 + inex1 = mpfr_remainder (r1, x, y, GMP_RNDU);
86 + /* since the quotient is -1, r1 is the rounding of x+y */
87 + inex2 = mpfr_add (r2, x, y, GMP_RNDU);
88 + if (mpfr_cmp (r1, r2))
90 + printf ("Error in mpfr_remainder (bug20090227)\n");
91 + printf ("Expected ");
104 main (int argc, char *argv[])
115 diff -Naur mpfr-2.4.1.orig/VERSION mpfr-2.4.1/VERSION
116 --- mpfr-2.4.1.orig/VERSION 2009-02-25 08:16:08.000000000 -0800
117 +++ mpfr-2.4.1/VERSION 2009-02-28 15:22:16.554489175 -0800
121 diff -Naur mpfr-2.4.1.orig/version.c mpfr-2.4.1/version.c
122 --- mpfr-2.4.1.orig/version.c 2009-02-25 08:16:08.000000000 -0800
123 +++ mpfr-2.4.1/version.c 2009-02-28 15:22:16.554489175 -0800
126 mpfr_get_version (void)