aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog183
-rwxr-xr-xmath/gen-libm-test.pl208
-rw-r--r--math/libm-test.inc1005
3 files changed, 361 insertions, 1035 deletions
diff --git a/ChangeLog b/ChangeLog
index f48f6bb4e3..4ebda2fe86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,186 @@
+2014-03-20 Joseph Myers <joseph@codesourcery.com>
+
+ * math/gen-libm-test.pl (generate_testfile): Expect only function
+ name as argument to AUTO_TESTS_* and pass results for all rounding
+ modes to parse_args.
+ (parse_auto_input): Separate inputs of automatic tests from
+ outputs before storing in %auto_tests.
+ * math/libm-test.inc (acos_test_data): Update call to
+ AUTO_TESTS_f_f.
+ (acos_test): Use ALL_RM_TEST.
+ (acos_tonearest_test_data): Remove.
+ (acos_test_tonearest): Likewise.
+ (acos_towardzero_test_data): Likewise.
+ (acos_test_towardzero): Likewise.
+ (acos_downward_test_data): Likewise.
+ (acos_test_downward): Likewise.
+ (acos_upward_test_data): Likewise.
+ (acos_test_upward): Likewise.
+ (acosh_test_data): Update call to AUTO_TESTS_f_f.
+ (asin_test_data): Likewise.
+ (asin_test): Use ALL_RM_TEST.
+ (asin_tonearest_test_data): Remove.
+ (asin_test_tonearest): Likewise.
+ (asin_towardzero_test_data): Likewise.
+ (asin_test_towardzero): Likewise.
+ (asin_downward_test_data): Likewise.
+ (asin_test_downward): Likewise.
+ (asin_upward_test_data): Likewise.
+ (asin_test_upward): Likewise.
+ (asinh_test_data): Update call to AUTO_TESTS_f_f.
+ (atan_test_data): Likewise.
+ (atanh_test_data): Likewise.
+ (atan2_test_data): Update call to AUTO_TESTS_ff_f.
+ (cabs_test_data): Update call to AUTO_TESTS_c_f.
+ (carg_test_data): Likewise.
+ (cbrt_test_data): Update call to AUTO_TESTS_f_f.
+ (ccos_test_data): Update call to AUTO_TESTS_c_c.
+ (ccosh_test_data): Likewise.
+ (cexp_test_data): Likewise.
+ (clog_test_data): Likewise.
+ (clog10_test_data): Likewise.
+ (cos_test_data): Update call to AUTO_TESTS_f_f.
+ (cos_test): Use ALL_RM_TEST.
+ (cos_tonearest_test_data): Remove.
+ (cos_test_tonearest): Likewise.
+ (cos_towardzero_test_data): Likewise.
+ (cos_test_towardzero): Likewise.
+ (cos_downward_test_data): Likewise.
+ (cos_test_downward): Likewise.
+ (cos_upward_test_data): Likewise.
+ (cos_test_upward): Likewise.
+ (cosh_test_data): Update call to AUTO_TESTS_f_f.
+ (cosh_test): Use ALL_RM_TEST.
+ (cosh_tonearest_test_data): Remove.
+ (cosh_test_tonearest): Likewise.
+ (cosh_towardzero_test_data): Likewise.
+ (cosh_test_towardzero): Likewise.
+ (cosh_downward_test_data): Likewise.
+ (cosh_test_downward): Likewise.
+ (cosh_upward_test_data): Likewise.
+ (cosh_test_upward): Likewise.
+ (cpow_test_data): Update call to AUTO_TESTS_cc_c.
+ (csqrt_test_data): Update call to AUTO_TESTS_c_c.
+ (ctan_test_data): Likewise.
+ (ctan_test): Use ALL_RM_TEST.
+ (ctan_tonearest_test_data): Remove.
+ (ctan_test_tonearest): Likewise.
+ (ctan_towardzero_test_data): Likewise.
+ (ctan_test_towardzero): Likewise.
+ (ctan_downward_test_data): Likewise.
+ (ctan_test_downward): Likewise.
+ (ctan_upward_test_data): Likewise.
+ (ctan_test_upward): Likewise.
+ (ctanh_test_data): Update call to AUTO_TESTS_c_c.
+ (ctanh_test): Use ALL_RM_TEST.
+ (ctanh_tonearest_test_data): Remove.
+ (ctanh_test_tonearest): Likewise.
+ (ctanh_towardzero_test_data): Likewise.
+ (ctanh_test_towardzero): Likewise.
+ (ctanh_downward_test_data): Likewise.
+ (ctanh_test_downward): Likewise.
+ (ctanh_upward_test_data): Likewise.
+ (ctanh_test_upward): Likewise.
+ (erf_test_data): Update call to AUTO_TESTS_f_f.
+ (erfc_test_data): Likewise.
+ (exp_test_data): Likewise.
+ (exp_test): Use ALL_RM_TEST.
+ (exp_tonearest_test_data): Remove.
+ (exp_test_tonearest): Likewise.
+ (exp_towardzero_test_data): Likewise.
+ (exp_test_towardzero): Likewise.
+ (exp_downward_test_data): Likewise.
+ (exp_test_downward): Likewise.
+ (exp_upward_test_data): Likewise.
+ (exp_test_upward): Likewise.
+ (exp10_test_data): Update call to AUTO_TESTS_f_f.
+ (exp10_test): Use ALL_RM_TEST.
+ (exp10_tonearest_test_data): Remove.
+ (exp10_test_tonearest): Likewise.
+ (exp10_towardzero_test_data): Likewise.
+ (exp10_test_towardzero): Likewise.
+ (exp10_downward_test_data): Likewise.
+ (exp10_test_downward): Likewise.
+ (exp10_upward_test_data): Likewise.
+ (exp10_test_upward): Likewise.
+ (exp2_test_data): Update call to AUTO_TESTS_f_f.
+ (expm1_test_data): Likewise.
+ (expm1_test): Use ALL_RM_TEST.
+ (expm1_tonearest_test_data): Remove.
+ (expm1_test_tonearest): Likewise.
+ (expm1_towardzero_test_data): Likewise.
+ (expm1_test_towardzero): Likewise.
+ (expm1_downward_test_data): Likewise.
+ (expm1_test_downward): Likewise.
+ (expm1_upward_test_data): Likewise.
+ (expm1_test_upward): Likewise.
+ (fma_test_data): Update call to AUTO_TESTS_fff_f.
+ (fma_test): Use ALL_RM_TEST.
+ (fma_towardzero_test_data): Remove.
+ (fma_test_towardzero): Likewise.
+ (fma_downward_test_data): Likewise.
+ (fma_test_downward): Likewise.
+ (fma_upward_test_data): Likewise.
+ (fma_test_upward): Likewise.
+ (hypot_test_data): Update call to AUTO_TESTS_ff_f.
+ (j0_test_data): Update call to AUTO_TESTS_f_f.
+ (j1_test_data): Likewise.
+ (jn_test_data): Update call to AUTO_TESTS_if_f.
+ (lgamma_test_data): Update call to AUTO_TESTS_f_f1.
+ (log_test_data): Update call to AUTO_TESTS_f_f.
+ (log10_test_data): Likewise.
+ (log1p_test_data): Likewise.
+ (log2_test_data): Likewise.
+ (pow_test_data): Update call to AUTO_TESTS_ff_f.
+ (pow_tonearest_test_data): Likewise.
+ (sin_test_data): Update call to AUTO_TESTS_f_f.
+ (sin_test): Use ALL_RM_TEST.
+ (sin_tonearest_test_data): Remove.
+ (sin_test_tonearest): Likewise.
+ (sin_towardzero_test_data): Likewise.
+ (sin_test_towardzero): Likewise.
+ (sin_downward_test_data): Likewise.
+ (sin_test_downward): Likewise.
+ (sin_upward_test_data): Likewise.
+ (sin_test_upward): Likewise.
+ (sincos_test_data): Update call to AUTO_TESTS_fFF_11.
+ (sinh_test_data): Update call to AUTO_TESTS_f_f.
+ (sinh_test): Use ALL_RM_TEST.
+ (sinh_tonearest_test_data): Remove.
+ (sinh_test_tonearest): Likewise.
+ (sinh_towardzero_test_data): Likewise.
+ (sinh_test_towardzero): Likewise.
+ (sinh_downward_test_data): Likewise.
+ (sinh_test_downward): Likewise.
+ (sinh_upward_test_data): Likewise.
+ (sinh_test_upward): Likewise.
+ (sqrt_test_data): Update call to AUTO_TESTS_f_f.
+ (sqrt_test): Use ALL_RM_TEST.
+ (sqrt_tonearest_test_data): Remove.
+ (sqrt_test_tonearest): Likewise.
+ (sqrt_towardzero_test_data): Likewise.
+ (sqrt_test_towardzero): Likewise.
+ (sqrt_downward_test_data): Likewise.
+ (sqrt_test_downward): Likewise.
+ (sqrt_upward_test_data): Likewise.
+ (sqrt_test_upward): Likewise.
+ (tan_test_data): Update call to AUTO_TESTS_f_f.
+ (tan_test): Use ALL_RM_TEST.
+ (tan_tonearest_test_data): Remove.
+ (tan_test_tonearest): Likewise.
+ (tan_towardzero_test_data): Likewise.
+ (tan_test_towardzero): Likewise.
+ (tan_downward_test_data): Likewise.
+ (tan_test_downward): Likewise.
+ (tan_upward_test_data): Likewise.
+ (tan_test_upward): Likewise.
+ (tanh_test_data): Update call to AUTO_TESTS_f_f.
+ (tgamma_test_data): Likewise.
+ (y0_test_data): Likewise.
+ (y1_test_data): Likewise.
+ (yn_test_data): Update call to AUTO_TESTS_if_f.
+ (main): Do not call removed functions.
+
2014-03-19 Joseph Myers <joseph@codesourcery.com>
* math/libm-test.inc (fdim_test): Use ALL_RM_TEST.
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index 92cb4badda..6b3a21df40 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -378,115 +378,137 @@ sub generate_testfile {
# Replace the special macros
while (<INPUT>) {
- # AUTO_TESTS (function, mode),
+ # AUTO_TESTS (function),
if (/^\s*AUTO_TESTS_/) {
- my ($descr, $func, $mode, $auto_test, $num_auto_tests);
- ($descr, $func, $mode) = ($_ =~ /AUTO_TESTS_(\w+)\s*\((\w+),\s*(\w+)\)/);
- $num_auto_tests = 0;
- foreach $auto_test (sort keys %{$auto_tests{$func}{$mode}}) {
- my ($finputs, $format, $inputs, $outputs, $flags);
- my ($format_conv, $flags_conv, @flags, %flag_cond);
- $num_auto_tests++;
- ($finputs, $outputs, $flags) = split / : */, $auto_test;
- ($format, $inputs) = split / /, $finputs, 2;
+ my ($descr, $func, @modes, $auto_test, $num_auto_tests);
+ my (@rm_tests, $rm, $i);
+ @modes = qw(downward tonearest towardzero upward);
+ ($descr, $func) = ($_ =~ /AUTO_TESTS_(\w+)\s*\((\w+)\)/);
+ for ($rm = 0; $rm <= 3; $rm++) {
+ $rm_tests[$rm] = [sort keys %{$auto_tests{$func}{$modes[$rm]}}];
+ }
+ $num_auto_tests = scalar @{$rm_tests[0]};
+ for ($rm = 1; $rm <= 3; $rm++) {
+ if ($num_auto_tests != scalar @{$rm_tests[$rm]}) {
+ die ("inconsistent numbers of tests for $func\n");
+ }
+ for ($i = 0; $i < $num_auto_tests; $i++) {
+ if ($rm_tests[0][$i] ne $rm_tests[$rm][$i]) {
+ die ("inconsistent list of tests of $func\n");
+ }
+ }
+ }
+ if ($num_auto_tests == 0) {
+ die ("no automatic tests for $func\n");
+ }
+ foreach $auto_test (@{$rm_tests[0]}) {
+ my ($format, $inputs, $format_conv, $args_str);
+ ($format, $inputs) = split / /, $auto_test, 2;
$inputs =~ s/ /, /g;
- $outputs =~ s/ /, /g;
$format_conv = convert_condition ($format);
print OUTPUT "#if $format_conv\n";
- @flags = split / /, $flags;
- foreach (@flags) {
- if (/^([^:]*):(.*)$/) {
- my ($flag, $cond);
- $flag = $1;
- $cond = convert_condition ($2);
- if (defined ($flag_cond{$flag})) {
- if ($flag_cond{$flag} ne "1") {
- $flag_cond{$flag} .= " || $cond";
+ $args_str = "$func, $inputs";
+ for ($rm = 0; $rm <= 3; $rm++) {
+ my ($auto_test_out, $outputs, $flags);
+ my ($flags_conv, @flags, %flag_cond);
+ $auto_test_out = $auto_tests{$func}{$modes[$rm]}{$auto_test};
+ ($outputs, $flags) = split / : */, $auto_test_out;
+ $outputs =~ s/ /, /g;
+ @flags = split / /, $flags;
+ foreach (@flags) {
+ if (/^([^:]*):(.*)$/) {
+ my ($flag, $cond);
+ $flag = $1;
+ $cond = convert_condition ($2);
+ if (defined ($flag_cond{$flag})) {
+ if ($flag_cond{$flag} ne "1") {
+ $flag_cond{$flag} .= " || $cond";
+ }
+ } else {
+ $flag_cond{$flag} = $cond;
}
} else {
- $flag_cond{$flag} = $cond;
+ $flag_cond{$_} = "1";
}
- } else {
- $flag_cond{$_} = "1";
}
- }
- $flags_conv = "";
- if (defined ($flag_cond{"no-test-inline"})) {
- $flags_conv .= or_cond_value ($flag_cond{"no-test-inline"},
- "NO_TEST_INLINE", "0");
- }
- if (defined ($flag_cond{"xfail"})) {
- $flags_conv .= or_cond_value ($flag_cond{"xfail"},
- "XFAIL_TEST", "0");
- }
- my (@exc_list) = qw(divbyzero inexact invalid overflow underflow);
- my ($exc);
- foreach $exc (@exc_list) {
- my ($exc_expected, $exc_ok, $no_exc, $exc_cond, $exc_ok_cond);
- $exc_expected = "\U$exc\E_EXCEPTION";
- $exc_ok = "\U$exc\E_EXCEPTION_OK";
- $no_exc = "0";
- if ($exc eq "inexact") {
- $exc_ok = "0";
- $no_exc = "NO_INEXACT_EXCEPTION";
- }
- if (defined ($flag_cond{$exc})) {
- $exc_cond = $flag_cond{$exc};
- } else {
- $exc_cond = "0";
+ $flags_conv = "";
+ if (defined ($flag_cond{"no-test-inline"})) {
+ $flags_conv .= or_cond_value ($flag_cond{"no-test-inline"},
+ "NO_TEST_INLINE", "0");
}
- if (defined ($flag_cond{"$exc-ok"})) {
- $exc_ok_cond = $flag_cond{"$exc-ok"};
- } else {
- $exc_ok_cond = "0";
+ if (defined ($flag_cond{"xfail"})) {
+ $flags_conv .= or_cond_value ($flag_cond{"xfail"},
+ "XFAIL_TEST", "0");
}
- $flags_conv .= or_cond_value ($exc_cond,
- cond_value ($exc_ok_cond,
- $exc_ok, $exc_expected),
- cond_value ($exc_ok_cond,
- $exc_ok, $no_exc));
- }
- my ($errno_expected, $errno_unknown_cond);
- if (defined ($flag_cond{"errno-edom"})) {
- if ($flag_cond{"errno-edom"} ne "1") {
- die ("unexpected condition for errno-edom");
+ my (@exc_list) = qw(divbyzero inexact invalid overflow underflow);
+ my ($exc);
+ foreach $exc (@exc_list) {
+ my ($exc_expected, $exc_ok, $no_exc, $exc_cond, $exc_ok_cond);
+ $exc_expected = "\U$exc\E_EXCEPTION";
+ $exc_ok = "\U$exc\E_EXCEPTION_OK";
+ $no_exc = "0";
+ if ($exc eq "inexact") {
+ $exc_ok = "0";
+ $no_exc = "NO_INEXACT_EXCEPTION";
+ }
+ if (defined ($flag_cond{$exc})) {
+ $exc_cond = $flag_cond{$exc};
+ } else {
+ $exc_cond = "0";
+ }
+ if (defined ($flag_cond{"$exc-ok"})) {
+ $exc_ok_cond = $flag_cond{"$exc-ok"};
+ } else {
+ $exc_ok_cond = "0";
+ }
+ $flags_conv .= or_cond_value ($exc_cond,
+ cond_value ($exc_ok_cond,
+ $exc_ok, $exc_expected),
+ cond_value ($exc_ok_cond,
+ $exc_ok, $no_exc));
}
- if (defined ($flag_cond{"errno-erange"})) {
- die ("multiple errno values expected");
+ my ($errno_expected, $errno_unknown_cond);
+ if (defined ($flag_cond{"errno-edom"})) {
+ if ($flag_cond{"errno-edom"} ne "1") {
+ die ("unexpected condition for errno-edom");
+ }
+ if (defined ($flag_cond{"errno-erange"})) {
+ die ("multiple errno values expected");
+ }
+ $errno_expected = "ERRNO_EDOM";
+ } elsif (defined ($flag_cond{"errno-erange"})) {
+ if ($flag_cond{"errno-erange"} ne "1") {
+ die ("unexpected condition for errno-erange");
+ }
+ $errno_expected = "ERRNO_ERANGE";
+ } else {
+ $errno_expected = "ERRNO_UNCHANGED";
}
- $errno_expected = "ERRNO_EDOM";
- } elsif (defined ($flag_cond{"errno-erange"})) {
- if ($flag_cond{"errno-erange"} ne "1") {
- die ("unexpected condition for errno-erange");
+ if (defined ($flag_cond{"errno-edom-ok"})) {
+ if (defined ($flag_cond{"errno-erange-ok"})
+ && ($flag_cond{"errno-erange-ok"}
+ ne $flag_cond{"errno-edom-ok"})) {
+ $errno_unknown_cond = "($flag_cond{\"errno-edom-ok\"} || $flag_cond{\"errno-erange-ok\"})";
+ } else {
+ $errno_unknown_cond = $flag_cond{"errno-edom-ok"};
+ }
+ } elsif (defined ($flag_cond{"errno-erange-ok"})) {
+ $errno_unknown_cond = $flag_cond{"errno-erange-ok"};
+ } else {
+ $errno_unknown_cond = "0";
}
- $errno_expected = "ERRNO_ERANGE";
- } else {
- $errno_expected = "ERRNO_UNCHANGED";
- }
- if (defined ($flag_cond{"errno-edom-ok"})) {
- if (defined ($flag_cond{"errno-erange-ok"})
- && $flag_cond{"errno-erange-ok"} ne $flag_cond{"errno-edom-ok"}) {
- $errno_unknown_cond = "($flag_cond{\"errno-edom-ok\"} || $flag_cond{\"errno-erange-ok\"})";
+ $flags_conv .= or_cond_value ($errno_unknown_cond,
+ "0", $errno_expected);
+ if ($flags_conv eq "") {
+ $flags_conv = ", NO_EXCEPTION";
} else {
- $errno_unknown_cond = $flag_cond{"errno-edom-ok"};
+ $flags_conv =~ s/^ \|/,/;
}
- } elsif (defined ($flag_cond{"errno-erange-ok"})) {
- $errno_unknown_cond = $flag_cond{"errno-erange-ok"};
- } else {
- $errno_unknown_cond = "0";
- }
- $flags_conv .= or_cond_value ($errno_unknown_cond,
- "0", $errno_expected);
- if ($flags_conv ne "") {
- $flags_conv =~ s/^ \|/,/;
+ $args_str .= ", $outputs$flags_conv";
}
- &parse_args (\*OUTPUT, $descr,
- "$func, $inputs, $outputs$flags_conv");
+ &parse_args (\*OUTPUT, $descr, $args_str);
print OUTPUT "#endif\n";
}
- if ($num_auto_tests == 0) {
- die ("no automatic tests for $func, $mode\n");
- }
next;
}
@@ -686,8 +708,8 @@ sub parse_auto_input {
chop;
next if !/^= /;
s/^= //;
- if (/^(\S+) (\S+) (.*)$/) {
- $auto_tests{$1}{$2}{$3} = 1;
+ if (/^(\S+) (\S+) ([^:]*) : (.*)$/) {
+ $auto_tests{$1}{$2}{$3} = $4;
} else {
die ("bad automatic test line: $_\n");
}
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 47c162fe27..b329b0065c 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1759,73 +1759,16 @@ static const struct test_f_f_data acos_test_data[] =
TEST_f_f (acos, max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acos, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
- AUTO_TESTS_f_f (acos, tonearest),
+ AUTO_TESTS_f_f (acos),
};
static void
acos_test (void)
{
- START (acos, 0);
- RUN_TEST_LOOP_f_f (acos, acos_test_data, );
- END;
-}
-
-
-static const struct test_f_f_data acos_tonearest_test_data[] =
- {
- AUTO_TESTS_f_f (acos, tonearest),
- };
-
-static void
-acos_test_tonearest (void)
-{
- START (acos_tonearest, 0);
- RUN_TEST_LOOP_f_f (acos, acos_tonearest_test_data, FE_TONEAREST);
- END;
-}
-
-
-static const struct test_f_f_data acos_towardzero_test_data[] =
- {
- AUTO_TESTS_f_f (acos, towardzero),
- };
-
-static void
-acos_test_towardzero (void)
-{
- START (acos_towardzero, 0);
- RUN_TEST_LOOP_f_f (acos, acos_towardzero_test_data, FE_TOWARDZERO);
- END;
+ ALL_RM_TEST (acos, 0, acos_test_data, RUN_TEST_LOOP_f_f, END);
}
-static const struct test_f_f_data acos_downward_test_data[] =
- {
- AUTO_TESTS_f_f (acos, downward),
- };
-
-static void
-acos_test_downward (void)
-{
- START (acos_downward, 0);
- RUN_TEST_LOOP_f_f (acos, acos_downward_test_data, FE_DOWNWARD);
- END;
-}
-
-
-static const struct test_f_f_data acos_upward_test_data[] =
- {
- AUTO_TESTS_f_f (acos, upward),
- };
-
-static void
-acos_test_upward (void)
-{
- START (acos_upward, 0);
- RUN_TEST_LOOP_f_f (acos, acos_upward_test_data, FE_UPWARD);
- END;
-}
-
static const struct test_f_f_data acosh_test_data[] =
{
TEST_f_f (acosh, plus_infty, plus_infty),
@@ -1843,7 +1786,7 @@ static const struct test_f_f_data acosh_test_data[] =
TEST_f_f (acosh, -1.125L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acosh, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
- AUTO_TESTS_f_f (acosh, tonearest),
+ AUTO_TESTS_f_f (acosh),
};
static void
@@ -1866,79 +1809,22 @@ static const struct test_f_f_data asin_test_data[] =
TEST_f_f (asin, max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (asin, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
- AUTO_TESTS_f_f (asin, tonearest),
+ AUTO_TESTS_f_f (asin),
};
static void
asin_test (void)
{
- START (asin, 0);
- RUN_TEST_LOOP_f_f (asin, asin_test_data, );
- END;
+ ALL_RM_TEST (asin, 0, asin_test_data, RUN_TEST_LOOP_f_f, END);
}
-static const struct test_f_f_data asin_tonearest_test_data[] =
- {
- AUTO_TESTS_f_f (asin, tonearest),
- };
-
-static void
-asin_test_tonearest (void)
-{
- START (asin_tonearest, 0);
- RUN_TEST_LOOP_f_f (asin, asin_tonearest_test_data, FE_TONEAREST);
- END;
-}
-
-
-static const struct test_f_f_data asin_towardzero_test_data[] =
- {
- AUTO_TESTS_f_f (asin, towardzero),
- };
-
-static void
-asin_test_towardzero (void)
-{
- START (asin_towardzero, 0);
- RUN_TEST_LOOP_f_f (asin, asin_towardzero_test_data, FE_TOWARDZERO);
- END;
-}
-
-
-static const struct test_f_f_data asin_downward_test_data[] =
- {
- AUTO_TESTS_f_f (asin, downward),
- };
-
-static void
-asin_test_downward (void)
-{
- START (asin_downward, 0);
- RUN_TEST_LOOP_f_f (asin, asin_downward_test_data, FE_DOWNWARD);
- END;
-}
-
-
-static const struct test_f_f_data asin_upward_test_data[] =
- {
- AUTO_TESTS_f_f (asin, upward),
- };
-
-static void
-asin_test_upward (void)
-{
- START (asin_upward, 0);
- RUN_TEST_LOOP_f_f (asin, asin_upward_test_data, FE_UPWARD);
- END;
-}
-
static const struct test_f_f_data asinh_test_data[] =
{
TEST_f_f (asinh, plus_infty, plus_infty, NO_TEST_INLINE),
TEST_f_f (asinh, minus_infty, minus_infty, NO_TEST_INLINE),
TEST_f_f (asinh, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- AUTO_TESTS_f_f (asinh, tonearest),
+ AUTO_TESTS_f_f (asinh),
};
static void
@@ -1955,7 +1841,7 @@ static const struct test_f_f_data atan_test_data[] =
TEST_f_f (atan, minus_infty, -M_PI_2l),
TEST_f_f (atan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- AUTO_TESTS_f_f (atan, tonearest),
+ AUTO_TESTS_f_f (atan),
};
static void
@@ -1982,7 +1868,7 @@ static const struct test_f_f_data atanh_test_data[] =
TEST_f_f (atanh, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (atanh, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
- AUTO_TESTS_f_f (atanh, tonearest),
+ AUTO_TESTS_f_f (atanh),
};
static void
@@ -2019,7 +1905,7 @@ static const struct test_ff_f_data atan2_test_data[] =
TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l),
TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- AUTO_TESTS_ff_f (atan2, tonearest),
+ AUTO_TESTS_ff_f (atan2),
};
static void
@@ -2044,7 +1930,7 @@ static const struct test_c_f_data cabs_test_data[] =
TEST_c_f (cabs, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_f (cabs, tonearest),
+ AUTO_TESTS_c_f (cabs),
};
static void
@@ -3463,7 +3349,7 @@ static const struct test_c_f_data carg_test_data[] =
TEST_c_f (carg, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_f (carg, tonearest),
+ AUTO_TESTS_c_f (carg),
};
static void
@@ -5889,7 +5775,7 @@ static const struct test_f_f_data cbrt_test_data[] =
TEST_f_f (cbrt, minus_infty, minus_infty),
TEST_f_f (cbrt, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- AUTO_TESTS_f_f (cbrt, tonearest),
+ AUTO_TESTS_f_f (cbrt),
};
static void
@@ -5948,7 +5834,7 @@ static const struct test_c_c_data ccos_test_data[] =
TEST_c_c (ccos, qnan_value, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_c (ccos, tonearest),
+ AUTO_TESTS_c_c (ccos),
};
static void
@@ -6007,7 +5893,7 @@ static const struct test_c_c_data ccosh_test_data[] =
TEST_c_c (ccosh, qnan_value, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_c (ccosh, tonearest),
+ AUTO_TESTS_c_c (ccosh),
};
static void
@@ -6174,7 +6060,7 @@ static const struct test_c_c_data cexp_test_data[] =
TEST_c_c (cexp, 1, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK),
TEST_c_c (cexp, qnan_value, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_c (cexp, tonearest),
+ AUTO_TESTS_c_c (cexp),
};
static void
@@ -6254,7 +6140,7 @@ static const struct test_c_c_data clog_test_data[] =
TEST_c_c (clog, qnan_value, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_c (clog, tonearest),
+ AUTO_TESTS_c_c (clog),
};
static void
@@ -6316,7 +6202,7 @@ static const struct test_c_c_data clog10_test_data[] =
TEST_c_c (clog10, qnan_value, qnan_value, qnan_value, qnan_value),
- AUTO_TESTS_c_c (clog10, tonearest),
+ AUTO_TESTS_c_c (clog10),
};
static void
@@ -6402,71 +6288,13 @@ static const struct test_f_f_data cos_test_data[] =
TEST_f_f (cos, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (cos, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
- AUTO_TESTS_f_f (cos, tonearest),
+ AUTO_TESTS_f_f (cos),
};
static void
cos_test (void)
{
- START (cos, 0);
- RUN_TEST_LOOP_f_f (cos, cos_test_data, );
- END;
-}
-
-
-static const struct test_f_f_data cos_tonearest_test_data[] =
- {
- AUTO_TESTS_f_f (cos, tonearest),
- };
-
-static void
-cos_test_tonearest (void)
-{
- START (cos_tonearest, 0);
- RUN_TEST_LOOP_f_f (cos, cos_tonearest_test_data, FE_TONEAREST);
- END;
-}
-
-
-static const struct test_f_f_data cos_towardzero_test_data[] =
- {
- AUTO_TESTS_f_f (cos, towardzero),
- };
-
-static void
-cos_test_towardzero (void)
-{
- START (cos_towardzero, 0);
- RUN_TEST_LOOP_f_f (cos, cos_towardzero_test_data, FE_TOWARDZERO);