source: patches/mpfr-3.1.5-fixes-1.patch@ 3accd6a

sysvinit
Last change on this file since 3accd6a was 926fdd5, checked in by William Harrington <kb0iic@…>, 8 years ago

Update MPFR to 3.1.5 and install html documentation.

  • Property mode set to 100644
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  
     1strtofr
     2vasprintf
  • mpfr-3.1.5

    diff -Naur mpfr-3.1.5.orig/VERSION mpfr-3.1.5/VERSION
    old new  
    1 3.1.5
     13.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  
    2727#define MPFR_VERSION_MAJOR 3
    2828#define MPFR_VERSION_MINOR 1
    2929#define MPFR_VERSION_PATCHLEVEL 5
    30 #define MPFR_VERSION_STRING "3.1.5"
     30#define MPFR_VERSION_STRING "3.1.5-p2"
    3131
    3232/* Macros dealing with MPFR VERSION */
    3333#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  
    743743         of the pstr_size most significant digits of pstr->mant, with
    744744         equality in case exact is non-zero. */
    745745
    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)))
    751754        break;
    752755
    753756    next_loop:
  • src/vasprintf.c

    diff -Naur mpfr-3.1.5.orig/src/vasprintf.c mpfr-3.1.5/src/vasprintf.c
    old new  
    15931593        }
    15941594      else if (spec.spec == 'f' || spec.spec == 'F')
    15951595        {
    1596           if (spec.prec == -1)
     1596          if (spec.prec < 0)
    15971597            spec.prec = 6;
    15981598          if (regular_fg (np, p, spec, NULL) == -1)
    15991599            goto error;
  • src/version.c

    diff -Naur mpfr-3.1.5.orig/src/version.c mpfr-3.1.5/src/version.c
    old new  
    2525const char *
    2626mpfr_get_version (void)
    2727{
    28   return "3.1.5";
     28  return "3.1.5-p2";
    2929}
  • tests/tsprintf.c

    diff -Naur mpfr-3.1.5.orig/tests/tsprintf.c mpfr-3.1.5/tests/tsprintf.c
    old new  
    12511251  check_emin_aux (MPFR_EMIN_MIN);
    12521252}
    12531253
     1254static void
     1255test20161214 (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
    12541273int
    12551274main (int argc, char **argv)
    12561275{
     
    12711290  mixed ();
    12721291  check_emax ();
    12731292  check_emin ();
     1293  test20161214 ();
    12741294
    12751295#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
    12761296#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  
    11911191  mpfr_clears (e, x1, x2, (mpfr_ptr) 0);
    11921192}
    11931193
     1194/* Note: the number is 5^47/2^9. */
     1195static void
     1196bug20161217 (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
    11941212int
    11951213main (int argc, char *argv[])
    11961214{
     
    12051223  test20100310 ();
    12061224  bug20120814 ();
    12071225  bug20120829 ();
     1226  bug20161217 ();
    12081227
    12091228  tests_end_mpfr ();
    12101229  return 0;
Note: See TracBrowser for help on using the repository browser.