mpfr: Remove obsolete versions

The following versions were marked obsolete in crosstool-ng-1.24.0,
remove them.
- mpfr-2.4.2
- mpfr-3.0.1

Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
Chris Packham 2021-09-21 19:56:07 +12:00
parent 2639848dbd
commit 173b28584d
11 changed files with 0 additions and 761 deletions

View File

@ -1,187 +0,0 @@
---
PATCHES | 1
VERSION | 2 -
mpfr.h | 2 -
sin_cos.c | 34 +++++++++++++++++----------------
tests/tsin_cos.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++--------
version.c | 2 -
6 files changed, 70 insertions(+), 27 deletions(-)
--- /dev/null
+++ b/PATCHES
@@ -0,0 +1 @@
+sin_cos_underflow
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4.2
+2.4.2-p1
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 2
#define MPFR_VERSION_MINOR 4
#define MPFR_VERSION_PATCHLEVEL 2
-#define MPFR_VERSION_STRING "2.4.2"
+#define MPFR_VERSION_STRING "2.4.2-p1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/sin_cos.c
+++ b/sin_cos.c
@@ -82,17 +82,19 @@
if (y != x)
/* y and x differ, thus we can safely try to compute y first */
{
- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0, rnd_mode,
- { inexy = _inexact;
- goto small_input; });
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
+ y, x, -2 * expx, 2, 0, rnd_mode,
+ { inexy = _inexact;
+ goto small_input; });
if (0)
{
small_input:
/* we can go here only if we can round sin(x) */
- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx,
- 1, 0, rnd_mode,
- { inexz = _inexact;
- goto end; });
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode,
+ { inexz = _inexact;
+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
+ goto end; });
}
/* if we go here, one of the two MPFR_FAST_COMPUTE_IF_SMALL_INPUT
@@ -101,18 +103,19 @@
else /* y and x are the same variable: try to compute z first, which
necessarily differs */
{
- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx,
- 1, 0, rnd_mode,
- { inexz = _inexact;
- goto small_input2; });
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode,
+ { inexz = _inexact;
+ goto small_input2; });
if (0)
{
small_input2:
/* we can go here only if we can round cos(x) */
- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0,
- rnd_mode,
- { inexy = _inexact;
- goto end; });
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (
+ y, x, -2 * expx, 2, 0, rnd_mode,
+ { inexy = _inexact;
+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
+ goto end; });
}
}
m += 2 * (-expx);
@@ -207,7 +210,6 @@
mpfr_clear (xr);
end:
- /* FIXME: update the underflow flag if need be. */
MPFR_SAVE_EXPO_FREE (expo);
mpfr_check_range (y, inexy, rnd_mode);
mpfr_check_range (z, inexz, rnd_mode);
--- a/tests/tsin_cos.c
+++ b/tests/tsin_cos.c
@@ -382,23 +382,56 @@
consistency (void)
{
mpfr_t x, s1, s2, c1, c2;
+ mp_exp_t emin, emax;
mp_rnd_t rnd;
+ unsigned int flags_sin, flags_cos, flags, flags_before, flags_ref;
+ int inex_sin, inex_cos, inex, inex_ref;
int i;
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
for (i = 0; i <= 10000; i++)
{
mpfr_init2 (x, MPFR_PREC_MIN + (randlimb () % 8));
mpfr_inits2 (MPFR_PREC_MIN + (randlimb () % 8), s1, s2, c1, c2,
(mpfr_ptr) 0);
- tests_default_random (x, 256, -5, 50);
- rnd = RND_RAND ();
- mpfr_sin (s1, x, rnd);
- mpfr_cos (c1, x, rnd);
- mpfr_sin_cos (s2, c2, x, rnd);
- if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2)))
+ if (i < 8 * GMP_RND_MAX)
+ {
+ int j = i / GMP_RND_MAX;
+ if (j & 1)
+ mpfr_set_emin (MPFR_EMIN_MIN);
+ mpfr_set_si (x, (j & 2) ? 1 : -1, GMP_RNDN);
+ mpfr_set_exp (x, mpfr_get_emin ());
+ rnd = (mpfr_rnd_t) (i % GMP_RND_MAX);
+ flags_before = 0;
+ if (j & 4)
+ mpfr_set_emax (-17);
+ }
+ else
+ {
+ tests_default_random (x, 256, -5, 50);
+ rnd = RND_RAND ();
+ flags_before = (randlimb () & 1) ?
+ (unsigned int) (MPFR_FLAGS_ALL ^ MPFR_FLAGS_ERANGE) :
+ (unsigned int) 0;
+ }
+ __gmpfr_flags = flags_before;
+ inex_sin = mpfr_sin (s1, x, rnd);
+ flags_sin = __gmpfr_flags;
+ __gmpfr_flags = flags_before;
+ inex_cos = mpfr_cos (c1, x, rnd);
+ flags_cos = __gmpfr_flags;
+ __gmpfr_flags = flags_before;
+ inex = !!mpfr_sin_cos (s2, c2, x, rnd);
+ flags = __gmpfr_flags;
+ inex_ref = inex_sin || inex_cos;
+ flags_ref = flags_sin | flags_cos;
+ if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2)) ||
+ inex != inex_ref || flags != flags_ref)
{
- printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s,\nx = ",
- mpfr_print_rnd_mode (rnd));
+ printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s,"
+ " i = %d\nx = ", mpfr_print_rnd_mode (rnd), i);
mpfr_dump (x);
printf ("s1 = ");
mpfr_dump (s1);
@@ -408,9 +441,16 @@
mpfr_dump (c1);
printf ("c2 = ");
mpfr_dump (c2);
+ printf ("inex_sin = %d, inex_cos = %d, inex = %d (expected %d)\n",
+ inex_sin, inex_cos, inex, inex_ref);
+ printf ("flags_sin = 0x%x, flags_cos = 0x%x, "
+ "flags = 0x%x (expected 0x%x)\n",
+ flags_sin, flags_cos, flags, flags_ref);
exit (1);
}
mpfr_clears (x, s1, s2, c1, c2, (mpfr_ptr) 0);
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
}
}
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "2.4.2";
+ return "2.4.2-p1";
}

View File

@ -1,75 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
mpfr-longlong.h | 21 +++++++++++++++++++--
mpfr.h | 2 +-
version.c | 2 +-
5 files changed, 23 insertions(+), 5 deletions(-)
--- a/PATCHES
+++ b/PATCHES
@@ -1 +1,2 @@
+longlong.h
sin_cos_underflow
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4.2-p1
+2.4.2-p2
--- a/mpfr-longlong.h
+++ b/mpfr-longlong.h
@@ -1011,7 +1011,15 @@
#endif /* __m88000__ */
#if defined (__mips) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype _r; \
+ _r = (UDItype) u * v; \
+ (w1) = _r >> 32; \
+ (w0) = (USItype) _r; \
+ } while (0)
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
#else
@@ -1024,7 +1032,16 @@
#endif /* __mips */
#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+typedef unsigned int UTItype __attribute__ ((mode (TI)));
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UTItype _r; \
+ _r = (UTItype) u * v; \
+ (w1) = _r >> 64; \
+ (w0) = (UDItype) _r; \
+ } while (0)
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
#else
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 2
#define MPFR_VERSION_MINOR 4
#define MPFR_VERSION_PATCHLEVEL 2
-#define MPFR_VERSION_STRING "2.4.2-p1"
+#define MPFR_VERSION_STRING "2.4.2-p2"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "2.4.2-p1";
+ return "2.4.2-p2";
}

View File

@ -1,80 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
configure | 3 +++
configure.in | 3 +++
mpfr-impl.h | 6 ++++++
mpfr.h | 2 +-
version.c | 2 +-
7 files changed, 16 insertions(+), 3 deletions(-)
--- a/PATCHES
+++ b/PATCHES
@@ -1,2 +1,3 @@
+gmp5
longlong.h
sin_cos_underflow
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4.2-p2
+2.4.2-p3
--- a/configure
+++ b/configure
@@ -20449,6 +20449,9 @@
main ()
{
+#ifndef BITS_PER_MP_LIMB
+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
+#endif
return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
&& sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
--- a/configure.in
+++ b/configure.in
@@ -424,6 +424,9 @@
#include "gmp.h"
#include "gmp-impl.h"
]], [[
+#ifndef BITS_PER_MP_LIMB
+#define BITS_PER_MP_LIMB GMP_LIMB_BITS
+#endif
return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
&& sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
]])], [AC_MSG_RESULT(yes)], [
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -65,6 +65,12 @@
# ifndef __GMP_IMPL_H__
# include "gmp-impl.h"
# endif
+# ifndef BITS_PER_MP_LIMB
+# define BITS_PER_MP_LIMB GMP_LIMB_BITS
+# endif
+#ifndef mpn_sqr_n
+# define mpn_sqr_n mpn_sqr
+#endif
# ifdef MPFR_NEED_LONGLONG_H
# include "longlong.h"
# endif
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 2
#define MPFR_VERSION_MINOR 4
#define MPFR_VERSION_PATCHLEVEL 2
-#define MPFR_VERSION_STRING "2.4.2-p2"
+#define MPFR_VERSION_STRING "2.4.2-p3"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "2.4.2-p2";
+ return "2.4.2-p3";
}

View File

@ -1,16 +0,0 @@
md5 mpfr-2.4.2.tar.xz f61da10945c3de6962749a5eb70dafd3
sha1 mpfr-2.4.2.tar.xz 1407793ff7b258f7fc893d80eccee5107a03ac72
sha256 mpfr-2.4.2.tar.xz d7271bbfbc9ddf387d3919df8318cd7192c67b232919bfa1cb3202d07843da1b
sha512 mpfr-2.4.2.tar.xz f4a5a47c7530e5a84cd3be015ee8cac791df5ef31649046710105ff8b6a112f8d6c67614021bc7b16b23d7debe66b42aaa2b7484d265577641e2ea8da6e5af7d
md5 mpfr-2.4.2.tar.bz2 89e59fe665e2b3ad44a6789f40b059a0
sha1 mpfr-2.4.2.tar.bz2 7ca93006e38ae6e53a995af836173cf10ee7c18c
sha256 mpfr-2.4.2.tar.bz2 c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba
sha512 mpfr-2.4.2.tar.bz2 c004b3dbf86c04960e4a1f8db37a409a7cc4cb76135e76e98dcc5ad93aaa8deb62334ee13ff84447a7c12a5e8cb57f25c62ac908c24920f1fb1a38d79d4a4c5e
md5 mpfr-2.4.2.tar.gz 0e3dcf9fe2b6656ed417c89aa9159428
sha1 mpfr-2.4.2.tar.gz d2c3504bd0318dda8332ca80523659e9779c367c
sha256 mpfr-2.4.2.tar.gz 246d7e184048b1fc48d3696dd302c9774e24e921204221540745e5464022b637
sha512 mpfr-2.4.2.tar.gz b0275941e3edd50757c80c0d2e8fdd1924f7f1b6a1f5c383e9b4369288c4b5e56d857297139c8d75467b3e55a4994f7e87e6a13de64232776e5fcf44381c4c7d
md5 mpfr-2.4.2.zip a21eab985b5f67064295b024072a380c
sha1 mpfr-2.4.2.zip c4dc686559f6a41b513eb8b921b76db2cf15faf8
sha256 mpfr-2.4.2.zip 1ba928eff5c5095bcb1aebce9e63458e282438f43a19a6726a2af94f03311eec
sha512 mpfr-2.4.2.zip fd181856d34ff7d741229627e5aca6c6df20af912910a76fdbc5635169f96cd410eb726d3d380e953fd11d890789b8596a393a64c64b7c4fd377b1b88d772ec0

View File

@ -1 +0,0 @@
obsolete='yes'

View File

@ -1,140 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
asin.c | 12 +++++++-----
mpfr.h | 2 +-
tests/tasin.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
version.c | 2 +-
6 files changed, 55 insertions(+), 8 deletions(-)
--- /dev/null
+++ b/PATCHES
@@ -0,0 +1 @@
+asin_exprange
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1
+3.0.1-p1
--- a/asin.c
+++ b/asin.c
@@ -63,11 +63,14 @@
compared = mpfr_cmp_ui (xp, 1);
+ MPFR_SAVE_EXPO_MARK (expo);
+
if (MPFR_UNLIKELY (compared >= 0))
{
mpfr_clear (xp);
if (compared > 0) /* asin(x) = NaN for |x| > 1 */
{
+ MPFR_SAVE_EXPO_FREE (expo);
MPFR_SET_NAN (asin);
MPFR_RET_NAN;
}
@@ -80,13 +83,11 @@
inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode));
MPFR_CHANGE_SIGN (asin);
}
- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */
- return inexact;
+ mpfr_div_2ui (asin, asin, 1, rnd_mode);
}
}
-
- MPFR_SAVE_EXPO_MARK (expo);
-
+ else
+ {
/* Compute exponent of 1 - ABS(x) */
mpfr_ui_sub (xp, 1, xp, MPFR_RNDD);
MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0);
@@ -115,6 +116,7 @@
inexact = mpfr_set (asin, xp, rnd_mode);
mpfr_clear (xp);
+ }
MPFR_SAVE_EXPO_FREE (expo);
return mpfr_check_range (asin, inexact, rnd_mode);
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1"
+#define MPFR_VERSION_STRING "3.0.1-p1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/tests/tasin.c
+++ b/tests/tasin.c
@@ -219,6 +219,49 @@
mpfr_clear (y);
}
+static void
+reduced_expo_range (void)
+{
+ mpfr_exp_t emin, emax;
+ mpfr_t x, y, ex_y;
+ int inex, ex_inex;
+ unsigned int flags, ex_flags;
+
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
+ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0);
+ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN);
+
+ mpfr_set_emin (1);
+ mpfr_set_emax (1);
+ mpfr_clear_flags ();
+ inex = mpfr_asin (y, x, MPFR_RNDA);
+ flags = __gmpfr_flags;
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
+
+ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN);
+ ex_inex = -1;
+ ex_flags = MPFR_FLAGS_INEXACT;
+
+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
+ ! mpfr_equal_p (y, ex_y))
+ {
+ printf ("Error in reduced_expo_range\non x = ");
+ mpfr_dump (x);
+ printf ("Expected y = ");
+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
+ printf ("Got y = ");
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
+ exit (1);
+ }
+
+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
+}
+
int
main (void)
{
@@ -226,6 +269,7 @@
special ();
special_overflow ();
+ reduced_expo_range ();
test_generic (2, 100, 15);
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1";
+ return "3.0.1-p1";
}

View File

@ -1,80 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
mpfr.h | 2 +-
rec_sqrt.c | 21 +++++++++++++++++++--
version.c | 2 +-
5 files changed, 23 insertions(+), 5 deletions(-)
--- a/PATCHES
+++ b/PATCHES
@@ -1 +1,2 @@
+rec_sqrt-carry
asin_exprange
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1-p1
+3.0.1-p2
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p1"
+#define MPFR_VERSION_STRING "3.0.1-p2"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/rec_sqrt.c
+++ b/rec_sqrt.c
@@ -375,20 +375,37 @@
MPFR_ASSERTD(un == ln + 1 || un == ln + 2);
/* the high un-ln limbs of u will overlap the low part of {x+ln,xn},
we need to add or subtract the overlapping part {u + ln, un - ln} */
+ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1
+ below (with size = th) mustn't be used. In such a case, the limb
+ (carry) will be 0, so that this is semantically a no-op, but if
+ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a
+ non-atomic read/write in a place that is not always allocated,
+ with the possible consequences: a crash if the corresponding
+ address is not mapped, or (rather unlikely) memory corruption
+ if another process/thread writes at the same place; things may
+ be worse with future GMP versions. Hence the tests carry != 0. */
if (neg == 0)
{
if (ln > 0)
MPN_COPY (x, u, ln);
cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln);
/* add cu at x+un */
- cy += mpn_add_1 (x + un, x + un, th, cu);
+ if (cu != 0)
+ {
+ MPFR_ASSERTD (th != 0);
+ cy += mpn_add_1 (x + un, x + un, th, cu);
+ }
}
else /* negative case */
{
/* subtract {u+ln, un-ln} from {x+ln,un} */
cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln);
/* carry cy is at x+un, like cu */
- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
+ if (cy + cu != 0)
+ {
+ MPFR_ASSERTD (th != 0);
+ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
+ }
/* cy cannot be zero, since the most significant bit of Xh is 1,
and the correction is bounded by 2^{-h+3} */
MPFR_ASSERTD(cy == 0);
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p1";
+ return "3.0.1-p2";
}

View File

@ -1,112 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
atan.c | 2 +-
mpfr.h | 2 +-
tests/tatan.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
version.c | 2 +-
6 files changed, 52 insertions(+), 4 deletions(-)
--- a/PATCHES
+++ b/PATCHES
@@ -1,2 +1,3 @@
+atan-expo-range
rec_sqrt-carry
asin_exprange
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1-p2
+3.0.1-p3
--- a/atan.c
+++ b/atan.c
@@ -431,5 +431,5 @@
MPFR_GROUP_CLEAR (group);
MPFR_SAVE_EXPO_FREE (expo);
- return mpfr_check_range (arctgt, inexact, rnd_mode);
+ return mpfr_check_range (atan, inexact, rnd_mode);
}
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p2"
+#define MPFR_VERSION_STRING "3.0.1-p3"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/tests/tatan.c
+++ b/tests/tatan.c
@@ -535,6 +535,52 @@
mpfr_clears (a, x, y, (mpfr_ptr) 0);
}
+/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html
+ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure).
+ */
+static void
+reduced_expo_range (void)
+{
+ mpfr_exp_t emin, emax;
+ mpfr_t x, y, ex_y;
+ int inex, ex_inex;
+ unsigned int flags, ex_flags;
+
+ emin = mpfr_get_emin ();
+ emax = mpfr_get_emax ();
+
+ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0);
+ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN);
+
+ mpfr_set_emin (-5);
+ mpfr_set_emax (-5);
+ mpfr_clear_flags ();
+ inex = mpfr_atan (y, x, MPFR_RNDN);
+ flags = __gmpfr_flags;
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
+
+ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN);
+ ex_inex = 1;
+ ex_flags = MPFR_FLAGS_INEXACT;
+
+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
+ ! mpfr_equal_p (y, ex_y))
+ {
+ printf ("Error in reduced_expo_range\non x = ");
+ mpfr_dump (x);
+ printf ("Expected y = ");
+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
+ printf ("Got y = ");
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
+ exit (1);
+ }
+
+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
+}
+
int
main (int argc, char *argv[])
{
@@ -546,6 +592,7 @@
smallvals_atan2 ();
atan2_bug_20071003 ();
atan2_different_prec ();
+ reduced_expo_range ();
test_generic_atan (2, 200, 17);
test_generic_atan2 (2, 200, 17);
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p2";
+ return "3.0.1-p3";
}

View File

@ -1,53 +0,0 @@
---
PATCHES | 1 +
VERSION | 2 +-
mpfr.h | 2 +-
tests/texp.c | 4 +++-
version.c | 2 +-
5 files changed, 7 insertions(+), 4 deletions(-)
--- a/PATCHES
+++ b/PATCHES
@@ -1,3 +1,4 @@
+texp-zero
atan-expo-range
rec_sqrt-carry
asin_exprange
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1-p3
+3.0.1-p4
--- a/mpfr.h
+++ b/mpfr.h
@@ -27,7 +27,7 @@
#define MPFR_VERSION_MAJOR 3
#define MPFR_VERSION_MINOR 0
#define MPFR_VERSION_PATCHLEVEL 1
-#define MPFR_VERSION_STRING "3.0.1-p3"
+#define MPFR_VERSION_STRING "3.0.1-p4"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
--- a/tests/texp.c
+++ b/tests/texp.c
@@ -170,7 +170,9 @@
mpfr_set_prec (x, prec);
mpfr_set_prec (y, prec);
mpfr_set_prec (z, prec);
- mpfr_urandomb (x, RANDS);
+ do
+ mpfr_urandomb (x, RANDS);
+ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */
rnd = RND_RAND ();
mpfr_exp_2 (y, x, rnd);
mpfr_exp_3 (z, x, rnd);
--- a/version.c
+++ b/version.c
@@ -25,5 +25,5 @@
const char *
mpfr_get_version (void)
{
- return "3.0.1-p3";
+ return "3.0.1-p4";
}

View File

@ -1,16 +0,0 @@
md5 mpfr-3.0.1.tar.xz 645882d9d179113a70af84d27086ed9f
sha1 mpfr-3.0.1.tar.xz f9d540a89c6b3b5840dbe074e7bdcf9124e07ae0
sha256 mpfr-3.0.1.tar.xz 28a96d58f2763528a979b2a016959dce2abbc8fef8142fa1860670c248760061
sha512 mpfr-3.0.1.tar.xz a025e70bff2f0b8e2d5c93f147a04c66ae40fa6595613671495eeb2a93ad720098826a634fa2255432de3e98ef8d3c0a7ef2ee461b006bf0ab0c0d39858b7a85
md5 mpfr-3.0.1.tar.bz2 bfbecb2eacb6d48432ead5cfc3f7390a
sha1 mpfr-3.0.1.tar.bz2 fbf402fc196724ae60ef01eb6ca8490b1ea4db69
sha256 mpfr-3.0.1.tar.bz2 e1977099bb494319c0f0c1f85759050c418a56884e9c6cef1c540b9b13e38e7f
sha512 mpfr-3.0.1.tar.bz2 bbac7d0d63fd3b4cd895e247c448adce7f4c2b6b66ecfe26af138018e0f96991fa8cbd8cbe94f924761aa1ac676e259af1228600dfc0854314e875e7739fd279
md5 mpfr-3.0.1.tar.gz e9c191fc46a4f5741f8a0a11ab33b8bf
sha1 mpfr-3.0.1.tar.gz caa0609934c0d2ffa29bd11bfa9c05fbade130eb
sha256 mpfr-3.0.1.tar.gz df67386b66c98adb0e5dc75c926b836a862da50b1e37c576328bb2d78e8bccc7
sha512 mpfr-3.0.1.tar.gz a99ae1063b2f28bf19b5f76dd06f58e6a5bd6e36820d50e75d2c160a5713ddd0bdfc1371298e6025285a6a749ad59eced30797a6f9395a37565d5db083531e4e
md5 mpfr-3.0.1.zip 035523ebf2e43dc0c233f02c04273a8a
sha1 mpfr-3.0.1.zip 3b7548b0d315bf3872421c8b586391851c601cb4
sha256 mpfr-3.0.1.zip 3ac8c903971c111c1f3e360a94af1732fcea7470ee9ae997b2b57e13b122226d
sha512 mpfr-3.0.1.zip 431ab0f9e3fc5fa15a73a655ebd7313e51279a0665ba99fb13b5f981081609fd67da323904712a2da90a53fed6789b330e14418d3fa3449ca376bb18ef536d38

View File

@ -1 +0,0 @@
obsolete='yes'