source:
clfs-embedded/patches/mpfr-2.4.1-branch_update-1.patch@
01f5ae5
Last change on this file since 01f5ae5 was 3ec3099, checked in by , 16 years ago | |
---|---|
|
|
File size: 3.6 KB |
-
mpfr-2.4.1
Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 2009-02-28 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.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-p1" 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 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/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); -
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-p1 -
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-p1"; 29 29 }
Note:
See TracBrowser
for help on using the repository browser.