source:
clfs-sysroot/patches/mpfr-2.4.1-branch_update-2.patch@
a7229a9
Last change on this file since a7229a9 was ce51ba0, checked in by , 15 years ago | |
---|---|
|
|
File size: 6.6 KB |
-
mpfr-gmp.c
Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 2009-04-15 Initial Package Version: 2.4.1 Origin: MPFR Website Upstream Status: Fixed Description: See http://www.mpfr.org Website Under Bugs diff -Naur mpfr-2.4.1.orig/mpfr-gmp.c mpfr-2.4.1/mpfr-gmp.c
old new 301 301 if (linenum != -1) 302 302 fprintf (stderr, "%d: ", linenum); 303 303 } 304 fprintf (stderr, " assertion failed: %s\n", expr);304 fprintf (stderr, "MPFR assertion failed: %s\n", expr); 305 305 abort(); 306 306 } 307 307 -
mpfr-2.4.1
diff -Naur mpfr-2.4.1.orig/mpfr.h mpfr-2.4.1/mpfr.h
old new 27 27 #define MPFR_VERSION_MAJOR 2 28 28 #define MPFR_VERSION_MINOR 4 29 29 #define MPFR_VERSION_PATCHLEVEL 1 30 #define MPFR_VERSION_STRING "2.4.1 "30 #define MPFR_VERSION_STRING "2.4.1-p5" 31 31 32 32 /* Macros dealing with MPFR VERSION */ 33 33 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -
mpfr-2.4.1
diff -Naur mpfr-2.4.1.orig/PATCHES mpfr-2.4.1/PATCHES
old new 1 zeta_ui-shift 2 vasprintf-mp_limb_t 3 assert 4 remainder-neg -
mpfr-2.4.1
diff -Naur mpfr-2.4.1.orig/rem1.c mpfr-2.4.1/rem1.c
old new 170 170 } 171 171 172 172 if (mpz_cmp_ui (r, 0) == 0) 173 inex = mpfr_set_ui (rem, 0, GMP_RNDN); 173 { 174 inex = mpfr_set_ui (rem, 0, GMP_RNDN); 175 /* take into account sign of x */ 176 if (signx < 0) 177 mpfr_neg (rem, rem, GMP_RNDN); 178 } 174 179 else 175 180 { 176 181 if (rnd_q == GMP_RNDN) … … 190 195 *quo += 1; 191 196 } 192 197 } 198 /* take into account sign of x */ 199 if (signx < 0) 200 mpz_neg (r, r); 193 201 inex = mpfr_set_z (rem, r, rnd); 194 202 /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */ 195 203 MPFR_EXP (rem) += (ex > ey) ? ey : ex; … … 198 206 if (quo) 199 207 *quo *= sign; 200 208 201 /* take into account sign of x */202 if (signx < 0)203 {204 mpfr_neg (rem, rem, GMP_RNDN);205 inex = -inex;206 }207 208 209 mpz_clear (mx); 209 210 mpz_clear (my); 210 211 mpz_clear (r); -
tests/tfprintf.c
diff -Naur mpfr-2.4.1.orig/tests/tfprintf.c mpfr-2.4.1/tests/tfprintf.c
old new 195 195 check_vfprintf (fout, "a. %Pu, b. %c, c. %Zi%Zn", prec, ch, mpz, &mpz); 196 196 check_length_with_cmp (6, mpz, 17, mpz_cmp_ui (mpz, 17), Zi); 197 197 check_vfprintf (fout, "%% a. %#.0RNg, b. %Qx%Rn, c. %p", mpfr, mpq, &mpfr, 198 &i);198 (void *) &i); 199 199 check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg); 200 200 201 201 #ifndef NPRINTF_T -
tests/tprintf.c
diff -Naur mpfr-2.4.1.orig/tests/tprintf.c mpfr-2.4.1/tests/tprintf.c
old new 191 191 check_length (5, sz, 34, zu); 192 192 check_vprintf ("a. %Pu, b. %c, c. %RUG, d. %Zi%Zn", prec, ch, mpfr, mpz, &mpz); 193 193 check_length_with_cmp (6, mpz, 24, mpz_cmp_ui (mpz, 24), Zi); 194 check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", mpfr, mpq, &mpfr, &i); 194 check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", 195 mpfr, mpq, &mpfr, (void *) &i); 195 196 check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg); 196 197 197 198 #ifndef NPRINTF_T -
tests/tremquo.c
diff -Naur mpfr-2.4.1.orig/tests/tremquo.c mpfr-2.4.1/tests/tremquo.c
old new 25 25 26 26 #include "mpfr-test.h" 27 27 28 static void 29 bug20090227 (void) 30 { 31 mpfr_t x, y, r1, r2; 32 int inex1, inex2; 33 34 mpfr_init2 (x, 118); 35 mpfr_init2 (y, 181); 36 mpfr_init2 (r1, 140); 37 mpfr_init2 (r2, 140); 38 mpfr_set_si (x, -1, GMP_RNDN); 39 mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010"); 40 inex1 = mpfr_remainder (r1, x, y, GMP_RNDU); 41 /* since the quotient is -1, r1 is the rounding of x+y */ 42 inex2 = mpfr_add (r2, x, y, GMP_RNDU); 43 if (mpfr_cmp (r1, r2)) 44 { 45 printf ("Error in mpfr_remainder (bug20090227)\n"); 46 printf ("Expected "); 47 mpfr_dump (r2); 48 printf ("Got "); 49 mpfr_dump (r1); 50 exit (1); 51 } 52 mpfr_clear (x); 53 mpfr_clear (y); 54 mpfr_clear (r1); 55 mpfr_clear (r2); 56 } 57 28 58 int 29 59 main (int argc, char *argv[]) 30 60 { … … 50 80 51 81 tests_start_mpfr (); 52 82 83 bug20090227 (); 84 53 85 mpfr_init (x); 54 86 mpfr_init (y); 55 87 mpfr_init (r); -
vasprintf.c
diff -Naur mpfr-2.4.1.orig/vasprintf.c mpfr-2.4.1/vasprintf.c
old new 398 398 (void) va_arg ((ap), mpq_srcptr); \ 399 399 break; \ 400 400 case MP_LIMB_ARG: \ 401 (void) va_arg ((ap), mp_ ptr);\401 (void) va_arg ((ap), mp_limb_t); \ 402 402 break; \ 403 403 case MP_LIMB_ARRAY_ARG: \ 404 404 (void) va_arg ((ap), mp_ptr); \ -
mpfr-2.4.1
diff -Naur mpfr-2.4.1.orig/VERSION mpfr-2.4.1/VERSION
old new 1 2.4.1 1 2.4.1-p5 -
version.c
diff -Naur mpfr-2.4.1.orig/version.c mpfr-2.4.1/version.c
old new 25 25 const char * 26 26 mpfr_get_version (void) 27 27 { 28 return "2.4.1 ";28 return "2.4.1-p5"; 29 29 } -
zeta_ui.c
diff -Naur mpfr-2.4.1.orig/zeta_ui.c mpfr-2.4.1/zeta_ui.c
old new 177 177 mpz_mul_ui (t, t, 2 * k - 1); 178 178 } 179 179 mpz_div_2exp (t, t, 1); 180 if (n < 1UL << (BITS_PER_MP_LIMB / 2)) 180 /* Warning: the test below assumes that an unsigned long 181 has no padding bits. */ 182 if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2)) 181 183 /* (n - k + 1) * (n + k - 1) < n^2 */ 182 184 mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1)); 183 185 else
Note:
See TracBrowser
for help on using the repository browser.