Test drem and pow10 in libm-test.inc.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 24 May 2013 20:33:14 +0000 (20:33 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 24 May 2013 20:33:14 +0000 (20:33 +0000)
ChangeLog
math/libm-test.inc
sysdeps/i386/fpu/libm-test-ulps
sysdeps/x86_64/fpu/libm-test-ulps

index 8594fda..bddd4d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-05-24  Joseph Myers  <joseph@codesourcery.com>
 
+       * math/libm-test.inc: Add drem and pow10 to list of tested
+       functions.
+       (pow10_test): New function.
+       (drem_test): Likewise.
+       (drem_test_tonearest): Likewise.
+       (drem_test_towardzero): Likewise.
+       (drem_test_downward): Likewise.
+       (drem_test_upward): Likewise.
+       (main): Call the new functions.
+
        * math/libm-test.inc (finite_test_data): Remove.
        (finite_test): Run tests from isfinite_test_data.
        (gamma_test_data): Remove.
index a03647a..91af668 100644 (file)
@@ -39,7 +39,7 @@
 
 /* This testsuite has currently tests for:
    acos, acosh, asin, asinh, atan, atan2, atanh,
-   cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp10, exp2, expm1,
+   cbrt, ceil, copysign, cos, cosh, drem, erf, erfc, exp, exp10, exp2, expm1,
    fabs, fdim, finite, floor, fma, fmax, fmin, fmod, fpclassify,
    frexp, gamma, hypot,
    ilogb, isfinite, isinf, isnan, isnormal, issignaling,
@@ -47,7 +47,7 @@
    j0, j1, jn,
    ldexp, lgamma, log, log10, log1p, log2, logb,
    modf, nearbyint, nextafter, nexttoward,
-   pow, remainder, remquo, rint, lrint, llrint,
+   pow, pow10, remainder, remquo, rint, lrint, llrint,
    round, lround, llround,
    scalb, scalbn, scalbln, signbit, sin, sincos, sinh, sqrt, tan, tanh, tgamma, trunc,
    y0, y1, yn, significand
    csin, csinh, csqrt, ctan, ctanh.
 
    At the moment the following functions and macros aren't tested:
-   drem (alias for remainder),
    lgamma_r,
-   nan,
-   pow10 (alias for exp10).
+   nan.
 
    Parameter handling is primitive in the moment:
    --verbose=[0..3] for different levels of output:
@@ -7953,6 +7951,15 @@ exp10_test (void)
   END;
 }
 
+static void
+pow10_test (void)
+{
+  START (pow10);
+  /* pow10 uses the same test data as exp10.  */
+  RUN_TEST_LOOP_f_f (pow10, exp10_test_data, );
+  END;
+}
+
 
 static const struct test_f_f_data exp2_test_data[] =
   {
@@ -12173,6 +12180,15 @@ remainder_test (void)
   END;
 }
 
+static void
+drem_test (void)
+{
+  START (drem);
+  /* drem uses the same test data as remainder.  */
+  RUN_TEST_LOOP_ff_f (drem, remainder_test_data, );
+  END;
+}
+
 
 static const struct test_ff_f_data remainder_tonearest_test_data[] =
   {
@@ -12209,6 +12225,15 @@ remainder_test_tonearest (void)
   END;
 }
 
+static void
+drem_test_tonearest (void)
+{
+  START (drem_tonearest);
+  /* drem uses the same test data as remainder.  */
+  RUN_TEST_LOOP_ff_f (drem, remainder_tonearest_test_data, FE_TONEAREST);
+  END;
+}
+
 
 static const struct test_ff_f_data remainder_towardzero_test_data[] =
   {
@@ -12245,6 +12270,15 @@ remainder_test_towardzero (void)
   END;
 }
 
+static void
+drem_test_towardzero (void)
+{
+  START (drem_towardzero);
+  /* drem uses the same test data as remainder.  */
+  RUN_TEST_LOOP_ff_f (drem, remainder_towardzero_test_data, FE_TOWARDZERO);
+  END;
+}
+
 
 static const struct test_ff_f_data remainder_downward_test_data[] =
   {
@@ -12281,6 +12315,15 @@ remainder_test_downward (void)
   END;
 }
 
+static void
+drem_test_downward (void)
+{
+  START (drem_downward);
+  /* drem uses the same test data as remainder.  */
+  RUN_TEST_LOOP_ff_f (drem, remainder_downward_test_data, FE_DOWNWARD);
+  END;
+}
+
 
 static const struct test_ff_f_data remainder_upward_test_data[] =
   {
@@ -12317,6 +12360,15 @@ remainder_test_upward (void)
   END;
 }
 
+static void
+drem_test_upward (void)
+{
+  START (drem_upward);
+  /* drem uses the same test data as remainder.  */
+  RUN_TEST_LOOP_ff_f (drem, remainder_upward_test_data, FE_UPWARD);
+  END;
+}
+
 static const struct test_ffI_f1_data remquo_test_data[] =
   {
     TEST_ffI_f1 (remquo, 1, 0, qnan_value, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
@@ -14688,6 +14740,7 @@ main (int argc, char **argv)
   logb_test ();
   logb_test_downward ();
   modf_test ();
+  pow10_test ();
   ilogb_test ();
   scalb_test ();
   scalbn_test ();
@@ -14737,6 +14790,11 @@ main (int argc, char **argv)
   trunc_test ();
 
   /* Remainder functions:  */
+  drem_test ();
+  drem_test_tonearest ();
+  drem_test_towardzero ();
+  drem_test_downward ();
+  drem_test_upward ();
   fmod_test ();
   remainder_test ();
   remainder_test_tonearest ();
index 1d0e130..aff617c 100644 (file)
@@ -5674,6 +5674,11 @@ Test "pow (0x0.ffffffp0, -0x1p24)":
 ildouble: 1
 ldouble: 1
 
+# pow10
+Test "pow10 (0.75)":
+ildouble: 1
+ldouble: 1
+
 # pow_downward
 Test "pow_downward (1.0625, 1.125)":
 double: 1
@@ -7572,6 +7577,10 @@ Function: "pow":
 ildouble: 1
 ldouble: 1
 
+Function: "pow10":
+ildouble: 1
+ldouble: 1
+
 Function: "pow_downward":
 double: 1
 float: 1
index 0c73de4..db46ae1 100644 (file)
@@ -6791,6 +6791,26 @@ Test "pow (0x1.000002p0, 0x1p24)":
 float: 1
 ifloat: 1
 
+# pow10
+Test "pow10 (-1)":
+double: 1
+idouble: 1
+Test "pow10 (-305)":
+double: 1
+idouble: 1
+Test "pow10 (-36)":
+double: 1
+idouble: 1
+Test "pow10 (0.75)":
+ildouble: 1
+ldouble: 1
+Test "pow10 (3)":
+double: 1
+idouble: 1
+Test "pow10 (36)":
+double: 1
+idouble: 1
+
 # pow_downward
 Test "pow_downward (1.0625, 1.125)":
 ildouble: 1
@@ -8637,6 +8657,12 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "pow10":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
 Function: "pow_downward":
 float: 1
 ifloat: 1