This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Move TEST_f_f tests for [e-j]* functions from libm-test.inc to auto-libm-test-in


This patch continues moving libm TEST_f_f tests to auto-libm-test-*,
moving relevant tests of functions [e-j]*.

A new xfail-rounding facility is added for tests expected to fail (and
so be skipped) in some or all rounding modes other than
round-to-nearest (specifically, for incorrect overflow results in such
modes).  One bug in gen-auto-libm-tests is fixed where an assertion of
mpfr_regular_p should have been mpfr_number_p to allow for results
that underflow to 0 even with MPFR's large exponent range (such as exp
(-max)).

Tested x86_64 and x86 and ulps updated accordingly.

(Large auto-libm-test-out diffs omitted below.)

2013-12-02  Joseph Myers  <joseph@codesourcery.com>

	* math/auto-libm-test-in: Add tests of erf, erfc, exp, exp10,
	exp2, expm1, j0 and j1.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (erf_test_data): Use AUTO_TESTS_f_f.
	(erfc_test_data): Likewise.
	(exp_test_data): Likewise.
	(exp_tonearest_test_data): Likewise.
	(exp_towardzero_test_data): Likewise.
	(exp_downward_test_data): Likewise.
	(exp_upward_test_data): Likewise.
	(exp10_test_data): Likewise.
	(exp2_test_data): Likewise.
	(expm1_test_data): Likewise.
	(j0_test_data): Likewise.
	(j1_test_data): Likewise.
	* math/gen-auto-libm-tests.c: Mention "xfail-rounding" in comment.
	(input_flag_type): Add flag_xfail_rounding.
	(input_flags): Add xfail-rounding.
	(adjust_real): Assert mpfr_number_p not mpfr_regular_p.
	(output_for_one_input_case): Handle flag_xfail_rounding.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 7eac25f..392cc57 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -127,6 +127,154 @@ cosh 22
 cosh 23
 cosh 24
 
+erf 0
+erf -0
+erf 0.125
+erf 0.75
+erf 1.25
+erf 2.0
+erf 4.125
+erf 27.0
+erf -27.0
+erf -0x1.fffffffffffff8p-2
+
+erfc 0.0
+erfc -0
+erfc 0.125
+erfc 0.75
+erfc 1.25
+erfc 2.0
+erfc 0x1.f7303cp+1
+erfc 4.125
+erfc 0x1.ffa002p+2
+erfc 0x1.ffffc8p+2
+erfc -0x1.fffffffffffff8p-2
+# Bug 6786: errno may not be set on underflow.
+erfc 27.0 missing-errno
+erfc 0x1.ffff56789abcdef0123456789a8p+2
+
+exp 0
+exp -0
+exp 1
+exp 2
+exp 3
+exp 0.75
+exp 50.0
+exp 88.72269439697265625
+exp 709.75
+# Bug 16284: results on directed rounding may be incorrect.
+exp 1000.0 xfail-rounding:dbl-64
+exp 710 xfail-rounding:dbl-64
+exp -1234
+# Bug 16284: results on directed rounding may be incorrect.
+exp 1e5 xfail-rounding:dbl-64
+exp max xfail-rounding:dbl-64
+exp -max
+
+exp10 0
+exp10 -0
+exp10 3
+exp10 -1
+exp10 36
+exp10 -36
+exp10 305
+exp10 -305
+exp10 4932
+exp10 -4932
+exp10 1e5
+exp10 -1e5
+exp10 1e6
+exp10 -1e6
+exp10 max
+exp10 -max
+exp10 0.75
+
+exp2 0
+exp2 -0
+exp2 10
+exp2 -1
+exp2 1e6
+# Bug 16283: errno may not be set on underflow.
+exp2 -1e6 missing-errno
+exp2 max
+# Bug 16283: errno may not be set on underflow.
+exp2 -max missing-errno
+exp2 0.75
+exp2 100.5
+exp2 127
+exp2 -149
+exp2 1000.25
+exp2 1023
+# Bug 16283: errno may not be set on underflow.
+exp2 -1074 missing-errno
+exp2 16383
+# Bug 16283: errno may not be set on underflow.
+exp2 -16400 missing-errno
+
+expm1 0
+expm1 -0
+expm1 1
+expm1 0.75
+expm1 50.0
+expm1 127.0
+expm1 500.0
+expm1 11356.25
+expm1 -10.0
+expm1 -16.0
+expm1 -17.0
+expm1 -18.0
+expm1 -36.0
+expm1 -37.0
+expm1 -38.0
+expm1 -44.0
+expm1 -45.0
+expm1 -46.0
+expm1 -73.0
+expm1 -74.0
+expm1 -75.0
+expm1 -78.0
+expm1 -79.0
+expm1 -80.0
+expm1 -100.0
+expm1 -1000.0
+expm1 -10000.0
+expm1 -100000.0
+expm1 100000.0
+expm1 max
+expm1 -max
+
+j0 -1.0
+j0 0.0
+j0 0.125
+j0 0.75
+j0 1.0
+j0 1.5
+j0 2.0
+j0 8.0
+j0 10.0
+j0 4.0
+j0 -4.0
+j0 0x1.d7ce3ap+107
+j0 -0x1.001000001p+593
+j0 0x1p1023
+j0 0x1p16382
+j0 0x1p16383
+
+j1 -1.0
+j1 0.0
+j1 0.125
+j1 0.75
+j1 1.0
+j1 1.5
+j1 2.0
+j1 8.0
+j1 10.0
+j1 0x1.3ffp+74
+j1 0x1.ff00000000002p+840
+j1 0x1p1023
+j1 0x1p16382
+j1 0x1p16383
+
 sqrt 0
 sqrt -0
 sqrt 2209
diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
index 2b8d766..206a5d7 100644
--- a/math/gen-auto-libm-tests.c
+++ b/math/gen-auto-libm-tests.c
@@ -85,14 +85,17 @@
 
    The flag "no-test-inline" indicates a test is disabled for inline
    function testing; "xfail" indicates the test is disabled as
-   expected to produce incorrect results.  Otherwise, test flags are
-   of the form "spurious-<exception>" and "missing-<exception>", for
-   any exception ("overflow", "underflow", "inexact", "invalid",
-   "divbyzero"), "spurious-errno" and "missing-errno", to indicate
-   when tests are expected to deviate from the exception and errno
-   settings corresponding to the mathematical results.  "xfail",
-   "spurious-" and "missing-" flags should be accompanied by a comment
-   referring to an open bug in glibc Bugzilla.
+   expected to produce incorrect results, "xfail-rounding" indicates
+   the test is disabled only in rounding modes other than
+   round-to-nearest.  Otherwise, test flags are of the form
+   "spurious-<exception>" and "missing-<exception>", for any exception
+   ("overflow", "underflow", "inexact", "invalid", "divbyzero"),
+   "spurious-errno" and "missing-errno", to indicate when tests are
+   expected to deviate from the exception and errno settings
+   corresponding to the mathematical results.  "xfail",
+   "xfail-rounding", "spurious-" and "missing-" flags should be
+   accompanied by a comment referring to an open bug in glibc
+   Bugzilla.
 
    The output file auto-libm-test-out contains the test lines from
    auto-libm-test-in, and, after the line for a given test, some
@@ -309,6 +312,7 @@ typedef enum
   {
     flag_no_test_inline,
     flag_xfail,
+    flag_xfail_rounding,
     /* The "spurious" and "missing" flags must be in the same order as
        the fp_exception enumeration.  */
     flag_spurious_divbyzero,
@@ -335,6 +339,7 @@ static const char *const input_flags[num_input_flag_types] =
   {
     "no-test-inline",
     "xfail",
+    "xfail-rounding",
     "spurious-divbyzero",
     "spurious-inexact",
     "spurious-invalid",
@@ -815,7 +820,7 @@ adjust_real (mpfr_t r, bool inexact)
   if (!inexact)
     return;
   /* NaNs are exact, as are infinities in round-to-zero mode.  */
-  assert (mpfr_regular_p (r));
+  assert (mpfr_number_p (r));
   if (mpfr_cmpabs (r, global_min) < 0)
     assert_exact (mpfr_copysign (r, global_min, r, MPFR_RNDN));
   else if (mpfr_cmpabs (r, global_max) > 0)
@@ -1591,6 +1596,15 @@ output_for_one_input_case (FILE *fp, const char *filename, test_function *tf,
 			  error (EXIT_FAILURE, errno, "write to '%s'",
 				 filename);
 			break;
+		      case flag_xfail_rounding:
+			if (m != rm_tonearest)
+			  if (fprintf (fp, " xfail%s",
+				       (it->flags[i].cond
+					? it->flags[i].cond
+					: "")) < 0)
+			    error (EXIT_FAILURE, errno, "write to '%s'",
+				   filename);
+			break;
 		      default:
 			break;
 		      }
diff --git a/math/libm-test.inc b/math/libm-test.inc
index f321f6d..2e3e684 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -7714,23 +7714,11 @@ ctanh_test_upward (void)
 
 static const struct test_f_f_data erf_test_data[] =
   {
-    TEST_f_f (erf, 0, 0),
-    TEST_f_f (erf, minus_zero, minus_zero),
     TEST_f_f (erf, plus_infty, 1),
     TEST_f_f (erf, minus_infty, -1),
     TEST_f_f (erf, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
 
-    TEST_f_f (erf, 0.125L, 0.140316204801333817393029446521623398L),
-    TEST_f_f (erf, 0.75L, 0.711155633653515131598937834591410777L),
-    TEST_f_f (erf, 1.25L, 0.922900128256458230136523481197281140L),
-    TEST_f_f (erf, 2.0L, 0.995322265018952734162069256367252929L),
-    TEST_f_f (erf, 4.125L, 0.999999994576599200434933994687765914L),
-    TEST_f_f (erf, 27.0L, 1.0L),
-    TEST_f_f (erf, -27.0L, -1.0L),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 54
-    /* The input is not exactly representable as a double.  */
-    TEST_f_f (erf, -0x1.fffffffffffff8p-2L, -0.5204998778130465132916303345518417673509L),
-#endif
+    AUTO_TESTS_f_f (erf, tonearest),
   };
 
 static void
@@ -7746,31 +7734,9 @@ static const struct test_f_f_data erfc_test_data[] =
   {
     TEST_f_f (erfc, plus_infty, 0.0),
     TEST_f_f (erfc, minus_infty, 2.0),
-    TEST_f_f (erfc, 0.0, 1.0),
-    TEST_f_f (erfc, minus_zero, 1.0),
     TEST_f_f (erfc, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
 
-    TEST_f_f (erfc, 0.125L, 0.859683795198666182606970553478376602L),
-    TEST_f_f (erfc, 0.75L, 0.288844366346484868401062165408589223L),
-    TEST_f_f (erfc, 1.25L, 0.0770998717435417698634765188027188596L),
-    TEST_f_f (erfc, 2.0L, 0.00467773498104726583793074363274707139L),
-    TEST_f_f (erfc, 0x1.f7303cp+1L, 2.705500297238986897105236321218861842255e-8L),
-    TEST_f_f (erfc, 4.125L, 0.542340079956506600531223408575531062e-8L),
-    TEST_f_f (erfc, 0x1.ffa002p+2L, 1.233585992097580296336099501489175967033e-29L),
-    TEST_f_f (erfc, 0x1.ffffc8p+2L, 1.122671365033056305522366683719541099329e-29L),
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 54
-    /* The input is not exactly representable as a double.  */
-    TEST_f_f (erfc, -0x1.fffffffffffff8p-2L, 1.52049987781304651329163033455184176735L),
-# endif
-    /* The result can only be represented in long double.  */
-# if LDBL_MIN_10_EXP < -319
-    TEST_f_f (erfc, 27.0L, 0.523704892378925568501606768284954709e-318L),
-# endif
-# if LDBL_MANT_DIG >= 106
-    TEST_f_f (erfc, 0x1.ffff56789abcdef0123456789a8p+2L, 1.123161416304655390092138725253789378459e-29L),
-# endif
-#endif
+    AUTO_TESTS_f_f (erfc, tonearest),
   };
 
 static void
@@ -7784,34 +7750,11 @@ erfc_test (void)
 
 static const struct test_f_f_data exp_test_data[] =
   {
-    TEST_f_f (exp, 0, 1),
-    TEST_f_f (exp, minus_zero, 1),
-
     TEST_f_f (exp, plus_infty, plus_infty, NO_TEST_INLINE),
     TEST_f_f (exp, minus_infty, 0, NO_TEST_INLINE),
     TEST_f_f (exp, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
-    TEST_f_f (exp, 1, M_El),
 
-    TEST_f_f (exp, 2, M_E2l),
-    TEST_f_f (exp, 3, M_E3l),
-    TEST_f_f (exp, 0.75L, 2.11700001661267466854536981983709561L),
-    TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L),
-    TEST_f_f (exp, 88.72269439697265625L, 3.40233126623160774937554134772290447915e38L),
-#ifndef TEST_FLOAT
-    TEST_f_f (exp, 709.75L, 1.739836873264160557698252711673830393864768e+308L),
-#endif
-#if defined TEST_LDOUBLE && __LDBL_MAX_EXP__ > 1024
-    /* The result can only be represented in sane long double.  */
-    TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L),
-#endif
-
-#if !(defined TEST_LDOUBLE && LDBL_MAX_EXP > 1024)
-    TEST_f_f (exp, 710, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp, -1234, plus_zero, UNDERFLOW_EXCEPTION),
-#endif
-    TEST_f_f (exp, 1e5, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp, -max_value, 0, UNDERFLOW_EXCEPTION),
+    AUTO_TESTS_f_f (exp, tonearest),
   };
 
 static void
@@ -7825,9 +7768,7 @@ exp_test (void)
 
 static const struct test_f_f_data exp_tonearest_test_data[] =
   {
-    TEST_f_f (exp, 1, M_El),
-    TEST_f_f (exp, 2, M_E2l),
-    TEST_f_f (exp, 3, M_E3l),
+    AUTO_TESTS_f_f (exp, tonearest),
   };
 
 static void
@@ -7841,9 +7782,7 @@ exp_test_tonearest (void)
 
 static const struct test_f_f_data exp_towardzero_test_data[] =
   {
-    TEST_f_f (exp, 1, M_El),
-    TEST_f_f (exp, 2, M_E2l),
-    TEST_f_f (exp, 3, M_E3l),
+    AUTO_TESTS_f_f (exp, towardzero),
   };
 
 static void
@@ -7857,9 +7796,7 @@ exp_test_towardzero (void)
 
 static const struct test_f_f_data exp_downward_test_data[] =
   {
-    TEST_f_f (exp, 1, M_El),
-    TEST_f_f (exp, 2, M_E2l),
-    TEST_f_f (exp, 3, M_E3l),
+    AUTO_TESTS_f_f (exp, downward),
   };
 
 static void
@@ -7873,9 +7810,7 @@ exp_test_downward (void)
 
 static const struct test_f_f_data exp_upward_test_data[] =
   {
-    TEST_f_f (exp, 1, M_El),
-    TEST_f_f (exp, 2, M_E2l),
-    TEST_f_f (exp, 3, M_E3l),
+    AUTO_TESTS_f_f (exp, upward),
   };
 
 static void
@@ -7889,31 +7824,11 @@ exp_test_upward (void)
 
 static const struct test_f_f_data exp10_test_data[] =
   {
-    TEST_f_f (exp10, 0, 1),
-    TEST_f_f (exp10, minus_zero, 1),
-
     TEST_f_f (exp10, plus_infty, plus_infty),
     TEST_f_f (exp10, minus_infty, 0),
     TEST_f_f (exp10, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
-    TEST_f_f (exp10, 3, 1000),
-    TEST_f_f (exp10, -1, 0.1L),
-    TEST_f_f (exp10, 36, 1.0e36L),
-    TEST_f_f (exp10, -36, 1.0e-36L),
-#ifndef TEST_FLOAT
-    TEST_f_f (exp10, 305, 1.0e305L),
-    TEST_f_f (exp10, -305, 1.0e-305L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
-#endif
-#if defined TEST_LDOUBLE && LDBL_MAX_10_EXP >= 4932
-    TEST_f_f (exp10, 4932, 1.0e4932L),
-    TEST_f_f (exp10, -4932, 1.0e-4932L, UNDERFLOW_EXCEPTION),
-#endif
-    TEST_f_f (exp10, 1e5, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, -1e5, 0, UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, 1e6, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, -1e6, 0, UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, -max_value, 0, UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp10, 0.75L, 5.62341325190349080394951039776481231L),
+
+    AUTO_TESTS_f_f (exp10, tonearest),
   };
 
 static void
@@ -7936,34 +7851,11 @@ pow10_test (void)
 
 static const struct test_f_f_data exp2_test_data[] =
   {
-    TEST_f_f (exp2, 0, 1),
-    TEST_f_f (exp2, minus_zero, 1),
     TEST_f_f (exp2, plus_infty, plus_infty),
     TEST_f_f (exp2, minus_infty, 0),
     TEST_f_f (exp2, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
 
-    TEST_f_f (exp2, 10, 1024),
-    TEST_f_f (exp2, -1, 0.5),
-    TEST_f_f (exp2, 1e6, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp2, -1e6, 0, UNDERFLOW_EXCEPTION),
-    TEST_f_f (exp2, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (exp2, -max_value, 0, UNDERFLOW_EXCEPTION),
-    TEST_f_f (exp2, 0.75L, 1.68179283050742908606225095246642979L),
-
-    TEST_f_f (exp2, 100.5, 1.792728671193156477399422023278661496394e+30L),
-    TEST_f_f (exp2, 127, 0x1p127),
-    TEST_f_f (exp2, -149, 0x1p-149),
-
-#ifndef TEST_FLOAT
-    TEST_f_f (exp2, 1000.25, 1.274245659452564874772384918171765416737e+301L),
-    TEST_f_f (exp2, 1023, 0x1p1023),
-    TEST_f_f (exp2, -1074, 0x1p-1074),
-#endif
-
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
-    TEST_f_f (exp2, 16383, 0x1p16383L),
-    TEST_f_f (exp2, -16400, 0x1p-16400L),
-#endif
+    AUTO_TESTS_f_f (exp2, tonearest),
   };
 
 static void
@@ -7977,51 +7869,11 @@ exp2_test (void)
 
 static const struct test_f_f_data expm1_test_data[] =
   {
-    TEST_f_f (expm1, 0, 0),
-    TEST_f_f (expm1, minus_zero, minus_zero),
-
     TEST_f_f (expm1, plus_infty, plus_infty, NO_TEST_INLINE),
     TEST_f_f (expm1, minus_infty, -1, NO_TEST_INLINE),
     TEST_f_f (expm1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
 
-    TEST_f_f (expm1, 1, M_El - 1.0),
-    TEST_f_f (expm1, 0.75L, 1.11700001661267466854536981983709561L),
-
-    TEST_f_f (expm1, 50.0L, 5.1847055285870724640864533229334853848275e+21L),
-
-#ifndef TEST_FLOAT
-    TEST_f_f (expm1, 127.0L, 1.4302079958348104463583671072905261080748e+55L),
-    TEST_f_f (expm1, 500.0L, 1.4035922178528374107397703328409120821806e+217L),
-#endif
-
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
-    TEST_f_f (expm1, 11356.25L, 9.05128237311923300051376115753226014206e+4931L),
-#endif
-
-    TEST_f_f (expm1, -10.0, -0.9999546000702375151484644084844394493898L),
-    TEST_f_f (expm1, -16.0, -0.9999998874648252807408854862248209398728L),
-    TEST_f_f (expm1, -17.0, -0.9999999586006228121483334034897228104472L),
-    TEST_f_f (expm1, -18.0, -0.9999999847700202552873715638633707664826L),
-    TEST_f_f (expm1, -36.0, -0.9999999999999997680477169756430611687736L),
-    TEST_f_f (expm1, -37.0, -0.9999999999999999146695237425593420572195L),
-    TEST_f_f (expm1, -38.0, -0.9999999999999999686086720795197037129104L),
-    TEST_f_f (expm1, -44.0, -0.9999999999999999999221886775886620348429L),
-    TEST_f_f (expm1, -45.0, -0.9999999999999999999713748141945060635553L),
-    TEST_f_f (expm1, -46.0, -0.9999999999999999999894693826424461876212L),
-    TEST_f_f (expm1, -73.0, -0.9999999999999999999999999999999802074012L),
-    TEST_f_f (expm1, -74.0, -0.9999999999999999999999999999999927187098L),
-    TEST_f_f (expm1, -75.0, -0.9999999999999999999999999999999973213630L),
-    TEST_f_f (expm1, -78.0, -0.9999999999999999999999999999999998666385L),
-    TEST_f_f (expm1, -79.0, -0.9999999999999999999999999999999999509391L),
-    TEST_f_f (expm1, -80.0, -0.9999999999999999999999999999999999819515L),
-    TEST_f_f (expm1, -100.0, -1.0),
-    TEST_f_f (expm1, -1000.0, -1.0),
-    TEST_f_f (expm1, -10000.0, -1.0),
-    TEST_f_f (expm1, -100000.0, -1.0),
-
-    TEST_f_f (expm1, 100000.0, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (expm1, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_f_f (expm1, -max_value, -1),
+    AUTO_TESTS_f_f (expm1, tonearest),
   };
 
 static void
@@ -9693,29 +9545,8 @@ static const struct test_f_f_data j0_test_data[] =
     /* j0 is the Bessel function of the first kind of order 0 */
     TEST_f_f (j0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
     TEST_f_f (j0, plus_infty, 0),
-    TEST_f_f (j0, -1.0, 0.765197686557966551449717526102663221L),
-    TEST_f_f (j0, 0.0, 1.0),
-    TEST_f_f (j0, 0.125L, 0.996097563041985204620768999453174712L),
-    TEST_f_f (j0, 0.75L, 0.864242275166648623555731103820923211L),
-    TEST_f_f (j0, 1.0, 0.765197686557966551449717526102663221L),
-    TEST_f_f (j0, 1.5, 0.511827671735918128749051744283411720L),
-    TEST_f_f (j0, 2.0, 0.223890779141235668051827454649948626L),
-    TEST_f_f (j0, 8.0, 0.171650807137553906090869407851972001L),
-    TEST_f_f (j0, 10.0, -0.245935764451348335197760862485328754L),
-    TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L),
-    TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L),
-
-    TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L),
 
-#ifndef TEST_FLOAT
-    TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L),
-    TEST_f_f (j0, 0x1p1023L, -1.5665258060609012834424478437196679802783e-155L),
-#endif
-
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
-    TEST_f_f (j0, 0x1p16382L, -1.2193782500509000574176799046642541129387e-2466L),
-    TEST_f_f (j0, 0x1p16383L, 9.5859502826270374691362975419147645151233e-2467L),
-#endif
+    AUTO_TESTS_f_f (j0, tonearest),
   };
 
 static void
@@ -9733,27 +9564,7 @@ static const struct test_f_f_data j1_test_data[] =
     TEST_f_f (j1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
     TEST_f_f (j1, plus_infty, 0),
 
-    TEST_f_f (j1, -1.0, -0.440050585744933515959682203718914913L),
-    TEST_f_f (j1, 0.0, 0.0),
-    TEST_f_f (j1, 0.125L, 0.0623780091344946810942311355879361177L),
-    TEST_f_f (j1, 0.75L, 0.349243602174862192523281016426251335L),
-    TEST_f_f (j1, 1.0, 0.440050585744933515959682203718914913L),
-    TEST_f_f (j1, 1.5, 0.557936507910099641990121213156089400L),
-    TEST_f_f (j1, 2.0, 0.576724807756873387202448242269137087L),
-    TEST_f_f (j1, 8.0, 0.234636346853914624381276651590454612L),
-    TEST_f_f (j1, 10.0, 0.0434727461688614366697487680258592883L),
-
-    TEST_f_f (j1, 0x1.3ffp+74L, 1.818984347516051243459364437186082741567e-12L),
-
-#ifndef TEST_FLOAT
-    TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L),
-    TEST_f_f (j1, 0x1p1023L, 8.2687542933709649327986678723012001545638e-155L),
-#endif
-
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
-    TEST_f_f (j1, 0x1p16382L, 8.0839224448726336195866026476176740513439e-2467L),
-    TEST_f_f (j1, 0x1p16383L, -3.8895531955766020648617743624167352352217e-2467L),
-#endif
+    AUTO_TESTS_f_f (j1, tonearest),
   };
 
 static void
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index f2ae284..0234a61 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -5908,11 +5908,20 @@ ildouble: 2
 ldouble: 2
 
 # erf
+Test "erf (-0x8p-4)":
+ildouble: 1
+ldouble: 1
+Test "erf (0x1.4p+0)":
+double: 1
+idouble: 1
 Test "erf (1.25)":
 double: 1
 idouble: 1
 
 # erfc
+Test "erfc (0x1.4p+0)":
+ildouble: 1
+ldouble: 1
 Test "erfc (0x1.f7303cp+1)":
 double: 1
 idouble: 1
@@ -5924,6 +5933,36 @@ ldouble: 1
 Test "erfc (0x1.ffffc8p+2)":
 double: 1
 idouble: 1
+Test "erfc (0x2p+0)":
+double: 1
+idouble: 1
+Test "erfc (0x3.ee6078p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x4.2p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fe8008p+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd58p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd59e26af37bc8p+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd59e26af37bcp+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.ffff2p+0)":
+double: 1
+idouble: 1
 Test "erfc (1.25)":
 ildouble: 1
 ldouble: 1
@@ -5940,8 +5979,22 @@ ldouble: 1
 Test "exp10 (0.75)":
 ildouble: 1
 ldouble: 1
+Test "exp10 (0xcp-4)":
+ildouble: 1
+ldouble: 1
 
 # exp_downward
+Test "exp_downward (0x2.c5cp+8)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "exp_downward (0x2p+0)":
+ildouble: 1
+ldouble: 1
+Test "exp_downward (0x3.e8p+8)":
+ildouble: 1
+ldouble: 1
 Test "exp_downward (1)":
 ildouble: 1
 ldouble: 1
@@ -5961,6 +6014,17 @@ ildouble: 1
 ldouble: 1
 
 # exp_towardzero
+Test "exp_towardzero (0x2.c5cp+8)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "exp_towardzero (0x2p+0)":
+ildouble: 1
+ldouble: 1
+Test "exp_towardzero (0x3.e8p+8)":
+ildouble: 1
+ldouble: 1
 Test "exp_towardzero (1)":
 ildouble: 1
 ldouble: 1
@@ -5987,9 +6051,18 @@ idouble: 1
 ifloat: 1
 
 # expm1
+Test "expm1 (-0x2.dp+4)":
+ildouble: 1
+ldouble: 1
 Test "expm1 (-45.0)":
 ildouble: 1
 ldouble: 1
+Test "expm1 (0x1p+0)":
+ildouble: 1
+ldouble: 1
+Test "expm1 (0x2.c5c4p+12)":
+ildouble: 1
+ldouble: 1
 Test "expm1 (11356.25)":
 ildouble: 1
 ldouble: 1
@@ -6067,6 +6140,23 @@ ifloat: 1
 Test "j0 (-0x1.001000001p+593)":
 ildouble: 2
 ldouble: 2
+Test "j0 (-0x2.002000002p+592)":
+ildouble: 2
+ldouble: 2
+Test "j0 (-0x4p+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (-0xf.fffffp+124)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "j0 (-4.0)":
 double: 1
 float: 1
@@ -6083,6 +6173,43 @@ idouble: 1
 Test "j0 (0x1p16382)":
 ildouble: 1
 ldouble: 1
+Test "j0 (0x2p+0)":
+float: 1
+ifloat: 1
+Test "j0 (0x4p+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (0x4p+16380)":
+ildouble: 1
+ldouble: 1
+Test "j0 (0x8p+0)":
+float: 1
+ifloat: 1
+Test "j0 (0x8p+1020)":
+double: 1
+idouble: 1
+Test "j0 (0xap+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0xe.be71dp+104)":
+float: 1
+ifloat: 1
+Test "j0 (0xf.ffffffffffff8p+1020)":
+ildouble: 1
+ldouble: 1
+Test "j0 (0xf.fffffp+124)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "j0 (10.0)":
 double: 1
 float: 1
@@ -6114,6 +6241,32 @@ idouble: 1
 Test "j1 (0x1p16382)":
 ildouble: 1
 ldouble: 1
+Test "j1 (0x2p+0)":
+double: 1
+idouble: 1
+Test "j1 (0x4.ffcp+72)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "j1 (0x4p+16380)":
+ildouble: 1
+ldouble: 1
+Test "j1 (0x8p+0)":
+float: 1
+ifloat: 1
+Test "j1 (0xap+0)":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "j1 (0xf.fffffp+124)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 Test "j1 (10.0)":
 double: 2
 float: 1
@@ -6335,6 +6488,9 @@ ldouble: 1
 Test "pow10 (0.75)":
 ildouble: 1
 ldouble: 1
+Test "pow10 (0xcp-4)":
+ildouble: 1
+ldouble: 1
 
 # pow_downward
 Test "pow_downward (1.0625, 1.125)":
@@ -7919,6 +8075,8 @@ ldouble: 2
 Function: "erf":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 Function: "erfc":
 double: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 3310901..209fd49 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -6733,14 +6733,26 @@ ildouble: 2
 ldouble: 2
 
 # erf
+Test "erf (-0x8p-4)":
+ildouble: 1
+ldouble: 1
+Test "erf (0x1.4p+0)":
+double: 1
+idouble: 1
 Test "erf (1.25)":
 double: 1
 idouble: 1
 
 # erfc
+Test "erfc (-0x8p-4)":
+float: 1
+ifloat: 1
 Test "erfc (0.75)":
 float: 1
 ifloat: 1
+Test "erfc (0x1.4p+0)":
+ildouble: 1
+ldouble: 1
 Test "erfc (0x1.f7303cp+1)":
 double: 1
 idouble: 1
@@ -6751,6 +6763,36 @@ float: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "erfc (0x2p+0)":
+double: 1
+idouble: 1
+Test "erfc (0x3.ee6078p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x4.2p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fe8008p+0)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd58p+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd59e26af37bc8p+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd59e26af37bcp+0)":
+ildouble: 1
+ldouble: 1
+Test "erfc (0x7.fffd6p+0)":
+float: 1
+ifloat: 1
 Test "erfc (1.25)":
 ildouble: 1
 ldouble: 1
@@ -6764,6 +6806,15 @@ ildouble: 1
 ldouble: 1
 
 # exp10
+Test "exp10 (-0x1.31p+8)":
+double: 1
+idouble: 1
+Test "exp10 (-0x1p+0)":
+double: 1
+idouble: 1
+Test "exp10 (-0x2.4p+4)":
+double: 1
+idouble: 1
 Test "exp10 (-1)":
 double: 1
 idouble: 1
@@ -6776,6 +6827,15 @@ idouble: 1
 Test "exp10 (0.75)":
 ildouble: 1
 ldouble: 1
+Test "exp10 (0x2.4p+4)":
+double: 1
+idouble: 1
+Test "exp10 (0x3p+0)":
+double: 1
+idouble: 1
+Test "exp10 (0xcp-4)":
+ildouble: 1
+ldouble: 1
 Test "exp10 (3)":
 double: 1
 idouble: 1
@@ -6784,6 +6844,26 @@ double: 1
 idouble: 1
 
 # exp_downward
+Test "exp_downward (0x2.c5cp+8)":
+ildouble: 1
+ldouble: 1
+Test "exp_downward (0x2p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "exp_downward (0x3.e8p+8)":
+ildouble: 1
+ldouble: 1
+Test "exp_downward (0x3p+0)":
+double: 1
+idouble: 1
+Test "exp_downward (0x5.8b9028p+4)":
+double: 1
+idouble: 1
+Test "exp_downward (0xcp-4)":
+double: 1
+idouble: 1
 Test "exp_downward (1)":
 ildouble: 1
 ldouble: 1
@@ -6799,6 +6879,26 @@ ildouble: 1
 ldouble: 1
 
 # exp_towardzero
+Test "exp_towardzero (0x2.c5cp+8)":
+ildouble: 1
+ldouble: 1
+Test "exp_towardzero (0x2p+0)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "exp_towardzero (0x3.e8p+8)":
+ildouble: 1
+ldouble: 1
+Test "exp_towardzero (0x3p+0)":
+double: 1
+idouble: 1
+Test "exp_towardzero (0x5.8b9028p+4)":
+double: 1
+idouble: 1
+Test "exp_towardzero (0xcp-4)":
+double: 1
+idouble: 1
 Test "exp_towardzero (1)":
 ildouble: 1
 ldouble: 1
@@ -6814,17 +6914,54 @@ ildouble: 1
 ldouble: 1
 
 # exp_upward
+Test "exp_upward (-0x4.d2p+8)":
+double: 1
+idouble: 1
+Test "exp_upward (-0xf.ffffffffffff8p+1020)":
+double: 1
+idouble: 1
+Test "exp_upward (-0xf.fffffp+124)":
+double: 1
+idouble: 1
+Test "exp_upward (0x1p+0)":
+double: 1
+idouble: 1
+Test "exp_upward (0x2.c5cp+8)":
+double: 1
+idouble: 1
+Test "exp_upward (0x3.2p+4)":
+double: 1
+idouble: 1
 Test "exp_upward (1)":
 float: 1
 ifloat: 1
 
 # expm1
+Test "expm1 (-0x2.dp+4)":
+ildouble: 1
+ldouble: 1
 Test "expm1 (-45.0)":
 ildouble: 1
 ldouble: 1
 Test "expm1 (0.75)":
 double: 1
 idouble: 1
+Test "expm1 (0x1.f4p+8)":
+double: 1
+idouble: 1
+Test "expm1 (0x1p+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "expm1 (0x2.c5c4p+12)":
+ildouble: 1
+ldouble: 1
+Test "expm1 (0xcp-4)":
+double: 1
+idouble: 1
 Test "expm1 (1)":
 double: 1
 float: 1
@@ -6912,6 +7049,23 @@ ifloat: 1
 Test "j0 (-0x1.001000001p+593)":
 ildouble: 2
 ldouble: 2
+Test "j0 (-0x2.002000002p+592)":
+ildouble: 2
+ldouble: 2
+Test "j0 (-0x4p+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (-0xf.fffffp+124)":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
 Test "j0 (-4.0)":
 double: 1
 float: 1
@@ -6928,6 +7082,43 @@ ifloat: 2
 Test "j0 (0x1p16382)":
 ildouble: 1
 ldouble: 1
+Test "j0 (0x2p+0)":
+float: 2
+ifloat: 2
+Test "j0 (0x4p+0)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (0x4p+16380)":
+ildouble: 1
+ldouble: 1
+Test "j0 (0x8p+0)":
+float: 1
+ifloat: 1
+Test "j0 (0xap+0)":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (0xcp-4)":
+float: 1
+ifloat: 1
+Test "j0 (0xe.be71dp+104)":
+float: 2
+ifloat: 2
+Test "j0 (0xf.ffffffffffff8p+1020)":
+ildouble: 1
+ldouble: 1
+Test "j0 (0xf.fffffp+124)":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
 Test "j0 (10.0)":
 double: 2
 float: 1
@@ -6959,6 +7150,33 @@ idouble: 1
 Test "j1 (0x1p16382)":
 ildouble: 1
 ldouble: 1
+Test "j1 (0x2p+0)":
+double: 1
+idouble: 1
+Test "j1 (0x4.ffcp+72)":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "j1 (0x4p+16380)":
+ildouble: 1
+ldouble: 1
+Test "j1 (0x8p+0)":
+double: 1
+idouble: 1
+Test "j1 (0xap+0)":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "j1 (0xf.ffffffffffff8p+1020)":
+double: 1
+idouble: 1
+Test "j1 (0xf.fffffp+124)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 Test "j1 (10.0)":
 float: 2
 ifloat: 2
@@ -7212,6 +7430,15 @@ float: 1
 ifloat: 1
 
 # pow10
+Test "pow10 (-0x1.31p+8)":
+double: 1
+idouble: 1
+Test "pow10 (-0x1p+0)":
+double: 1
+idouble: 1
+Test "pow10 (-0x2.4p+4)":
+double: 1
+idouble: 1
 Test "pow10 (-1)":
 double: 1
 idouble: 1
@@ -7224,6 +7451,15 @@ idouble: 1
 Test "pow10 (0.75)":
 ildouble: 1
 ldouble: 1
+Test "pow10 (0x2.4p+4)":
+double: 1
+idouble: 1
+Test "pow10 (0x3p+0)":
+double: 1
+idouble: 1
+Test "pow10 (0xcp-4)":
+ildouble: 1
+ldouble: 1
 Test "pow10 (3)":
 double: 1
 idouble: 1
@@ -8931,6 +9167,8 @@ ldouble: 2
 Function: "erf":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 Function: "erfc":
 double: 1
@@ -8947,19 +9185,25 @@ ildouble: 1
 ldouble: 1
 
 Function: "exp_downward":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 ildouble: 2
 ldouble: 2
 
 Function: "exp_towardzero":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 ildouble: 2
 ldouble: 2
 
 Function: "exp_upward":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
 Function: "expm1":

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]