source:
patches/mpfr-3.1.5-fixes-1.patch@
c96cc3f
Last change on this file since c96cc3f was 79bc757, checked in by , 8 years ago | |
---|---|
|
|
File size: 5.0 KB |
-
mpfr-3.1.5
Submitted By: William Harrington (kb0iic at cross-lfs dot org) Date: 2017-05-10 Initial Package Version: 3.1.5 Origin: Upstream Upstream Status: Applied Description: Contains all upstream patches of mpfr current to patch level 2. diff -Naur mpfr-3.1.5.orig/PATCHES mpfr-3.1.5/PATCHES
old new 1 strtofr 2 vasprintf -
mpfr-3.1.5
diff -Naur mpfr-3.1.5.orig/VERSION mpfr-3.1.5/VERSION
old new 1 3.1.5 1 3.1.5-p2 -
src/mpfr.h
diff -Naur mpfr-3.1.5.orig/src/mpfr.h mpfr-3.1.5/src/mpfr.h
old new 27 27 #define MPFR_VERSION_MAJOR 3 28 28 #define MPFR_VERSION_MINOR 1 29 29 #define MPFR_VERSION_PATCHLEVEL 5 30 #define MPFR_VERSION_STRING "3.1.5 "30 #define MPFR_VERSION_STRING "3.1.5-p2" 31 31 32 32 /* Macros dealing with MPFR VERSION */ 33 33 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -
src/strtofr.c
diff -Naur mpfr-3.1.5.orig/src/strtofr.c mpfr-3.1.5/src/strtofr.c
old new 743 743 of the pstr_size most significant digits of pstr->mant, with 744 744 equality in case exact is non-zero. */ 745 745 746 /* test if rounding is possible, and if so exit the loop */ 747 if (exact || mpfr_can_round_raw (result, ysize, 748 (pstr->negative) ? -1 : 1, 749 ysize_bits - err - 1, 750 MPFR_RNDN, rnd, MPFR_PREC(x))) 746 /* test if rounding is possible, and if so exit the loop. 747 Note: we also need to be able to determine the correct ternary value, 748 thus we use the MPFR_PREC(x) + (rnd == MPFR_RNDN) trick. 749 For example if result = xxx...xxx111...111 and rnd = RNDN, 750 then we know the correct rounding is xxx...xx(x+1), but we cannot know 751 the correct ternary value. */ 752 if (exact || mpfr_round_p (result, ysize, ysize_bits - err - 1, 753 MPFR_PREC(x) + (rnd == MPFR_RNDN))) 751 754 break; 752 755 753 756 next_loop: -
src/vasprintf.c
diff -Naur mpfr-3.1.5.orig/src/vasprintf.c mpfr-3.1.5/src/vasprintf.c
old new 1593 1593 } 1594 1594 else if (spec.spec == 'f' || spec.spec == 'F') 1595 1595 { 1596 if (spec.prec == -1)1596 if (spec.prec < 0) 1597 1597 spec.prec = 6; 1598 1598 if (regular_fg (np, p, spec, NULL) == -1) 1599 1599 goto error; -
src/version.c
diff -Naur mpfr-3.1.5.orig/src/version.c mpfr-3.1.5/src/version.c
old new 25 25 const char * 26 26 mpfr_get_version (void) 27 27 { 28 return "3.1.5 ";28 return "3.1.5-p2"; 29 29 } -
tests/tsprintf.c
diff -Naur mpfr-3.1.5.orig/tests/tsprintf.c mpfr-3.1.5/tests/tsprintf.c
old new 1251 1251 check_emin_aux (MPFR_EMIN_MIN); 1252 1252 } 1253 1253 1254 static void 1255 test20161214 (void) 1256 { 1257 mpfr_t x; 1258 char buf[32]; 1259 const char s[] = "0x0.fffffffffffff8p+1024"; 1260 int r; 1261 1262 mpfr_init2 (x, 64); 1263 mpfr_set_str (x, s, 16, MPFR_RNDN); 1264 r = mpfr_snprintf (buf, 32, "%.*RDf", -2, x); 1265 MPFR_ASSERTN(r == 316); 1266 r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN + 1, x); 1267 MPFR_ASSERTN(r == 316); 1268 r = mpfr_snprintf (buf, 32, "%.*RDf", INT_MIN, x); 1269 MPFR_ASSERTN(r == 316); 1270 mpfr_clear (x); 1271 } 1272 1254 1273 int 1255 1274 main (int argc, char **argv) 1256 1275 { … … 1271 1290 mixed (); 1272 1291 check_emax (); 1273 1292 check_emin (); 1293 test20161214 (); 1274 1294 1275 1295 #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) 1276 1296 #if MPFR_LCONV_DPTS -
tests/tstrtofr.c
diff -Naur mpfr-3.1.5.orig/tests/tstrtofr.c mpfr-3.1.5/tests/tstrtofr.c
old new 1191 1191 mpfr_clears (e, x1, x2, (mpfr_ptr) 0); 1192 1192 } 1193 1193 1194 /* Note: the number is 5^47/2^9. */ 1195 static void 1196 bug20161217 (void) 1197 { 1198 mpfr_t fp, z; 1199 static const char * num = "0.1387778780781445675529539585113525390625e31"; 1200 int inex; 1201 1202 mpfr_init2 (fp, 110); 1203 mpfr_init2 (z, 110); 1204 inex = mpfr_strtofr (fp, num, NULL, 10, MPFR_RNDN); 1205 MPFR_ASSERTN(inex == 0); 1206 mpfr_set_str_binary (z, "10001100001000010011110110011101101001010000001011011110010001010100010100100110111101000010001011001100001101E-9"); 1207 MPFR_ASSERTN(mpfr_equal_p (fp, z)); 1208 mpfr_clear (fp); 1209 mpfr_clear (z); 1210 } 1211 1194 1212 int 1195 1213 main (int argc, char *argv[]) 1196 1214 { … … 1205 1223 test20100310 (); 1206 1224 bug20120814 (); 1207 1225 bug20120829 (); 1226 bug20161217 (); 1208 1227 1209 1228 tests_end_mpfr (); 1210 1229 return 0;
Note:
See TracBrowser
for help on using the repository browser.