diff options
author | Alexey Neyman <stilor@att.net> | 2017-12-02 20:44:39 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-12-02 20:44:39 (GMT) |
commit | 98bc4decdeab1361bdc585c86591718fb08c8ffb (patch) | |
tree | 4e048ed57988306696efa3c5b81a80d48030e913 /packages/mpfr/3.0.1/0002-atan-expo-range.patch | |
parent | 2a1935f3ad41d360dd3d96a1b0486083293651dd (diff) |
Run all patches through renumbering and update
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/mpfr/3.0.1/0002-atan-expo-range.patch')
-rw-r--r-- | packages/mpfr/3.0.1/0002-atan-expo-range.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/packages/mpfr/3.0.1/0002-atan-expo-range.patch b/packages/mpfr/3.0.1/0002-atan-expo-range.patch new file mode 100644 index 0000000..060d8de --- /dev/null +++ b/packages/mpfr/3.0.1/0002-atan-expo-range.patch @@ -0,0 +1,112 @@ +--- + 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"; + } |