[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r23141 - in /fsf/trunk/libc: ./ libio/ manual/ math/ ports/ ports/sysdeps/tile/ ports/sysdeps/tile/tilegx/ sysdeps/i386/fpu/...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r23141 - in /fsf/trunk/libc: ./ libio/ manual/ math/ ports/ ports/sysdeps/tile/ ports/sysdeps/tile/tilegx/ sysdeps/i386/fpu/...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 25 May 2013 00:01:56 -0000
Author: eglibc
Date: Sat May 25 00:01:54 2013
New Revision: 23141
Log:
Import glibc-mainline for 2013-05-25
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/libio/genops.c
fsf/trunk/libc/manual/platform.texi
fsf/trunk/libc/math/gen-libm-test.pl
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/ports/ChangeLog.tile
fsf/trunk/libc/ports/sysdeps/tile/crti.S
fsf/trunk/libc/ports/sysdeps/tile/start.S
fsf/trunk/libc/ports/sysdeps/tile/tilegx/Makefile
fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_hypotl.c
fsf/trunk/libc/sysdeps/powerpc/sys/platform/ppc.h
fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat May 25 00:01:54 2013
@@ -1,3 +1,396 @@
+2013-05-24 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #15529]
+ * sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Set high
+ bit of mantissa of 2^16382.
+ * math/libm-test.inc (hypot_test_data): Add more tests.
+
+ * 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.
+ (gamma_test): Run tests from lgamma_test_data.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2013-05-24 Adhemerval Zanella <azanella@xxxxxxxxxxxxxxxxxx>
+
+ * manual/platform.texi: Add PowerPC PPR function set documentation.
+ * sysdeps/powerpc/sys/platform/ppc.h: Add PowerPC PPR set function
+ implementation.
+
+2013-05-24 Carlos O'Donell <carlos@xxxxxxxxxx>
+
+ * math/libm-test.inc (MAX_EXP): Define.
+ (ULPDIFF): Define.
+ (ulp): New function.
+ (check_float_internal): Use ULPDIFF.
+ (cpow_test): Disable failing test.
+ (check_ulp): Test ulp() implemetnation.
+ (main): Call check_ulp before starting tests.
+
+2013-05-24 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * math/gen-libm-test.pl (generate_testfile): Do not handle
+ START_DATA and END_DATA.
+ * math/libm-test.inc (acos_test_data): Do not use START_DATA and
+ END_DATA.
+ (acos_tonearest_test_data): Likewise.
+ (acos_towardzero_test_data): Likewise.
+ (acos_downward_test_data): Likewise.
+ (acos_upward_test_data): Likewise.
+ (acosh_test_data): Likewise.
+ (asin_test_data): Likewise.
+ (asin_tonearest_test_data): Likewise.
+ (asin_towardzero_test_data): Likewise.
+ (asin_downward_test_data): Likewise.
+ (asin_upward_test_data): Likewise.
+ (asinh_test_data): Likewise.
+ (atan_test_data): Likewise.
+ (atanh_test_data): Likewise.
+ (atan2_test_data): Likewise.
+ (cabs_test_data): Likewise.
+ (cacos_test_data): Likewise.
+ (cacosh_test_data): Likewise.
+ (carg_test_data): Likewise.
+ (casin_test_data): Likewise.
+ (casinh_test_data): Likewise.
+ (catan_test_data): Likewise.
+ (catanh_test_data): Likewise.
+ (cbrt_test_data): Likewise.
+ (ccos_test_data): Likewise.
+ (ccosh_test_data): Likewise.
+ (ceil_test_data): Likewise.
+ (cexp_test_data): Likewise.
+ (cimag_test_data): Likewise.
+ (clog_test_data): Likewise.
+ (clog10_test_data): Likewise.
+ (conj_test_data): Likewise.
+ (copysign_test_data): Likewise.
+ (cos_test_data): Likewise.
+ (cos_tonearest_test_data): Likewise.
+ (cos_towardzero_test_data): Likewise.
+ (cos_downward_test_data): Likewise.
+ (cos_upward_test_data): Likewise.
+ (cosh_test_data): Likewise.
+ (cosh_tonearest_test_data): Likewise.
+ (cosh_towardzero_test_data): Likewise.
+ (cosh_downward_test_data): Likewise.
+ (cosh_upward_test_data): Likewise.
+ (cpow_test_data): Likewise.
+ (cproj_test_data): Likewise.
+ (creal_test_data): Likewise.
+ (csin_test_data): Likewise.
+ (csinh_test_data): Likewise.
+ (csqrt_test_data): Likewise.
+ (ctan_test_data): Likewise.
+ (ctan_tonearest_test_data): Likewise.
+ (ctan_towardzero_test_data): Likewise.
+ (ctan_downward_test_data): Likewise.
+ (ctan_upward_test_data): Likewise.
+ (ctanh_test_data): Likewise.
+ (ctanh_tonearest_test_data): Likewise.
+ (ctanh_towardzero_test_data): Likewise.
+ (ctanh_downward_test_data): Likewise.
+ (ctanh_upward_test_data): Likewise.
+ (erf_test_data): Likewise.
+ (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.
+ (fabs_test_data): Likewise.
+ (fdim_test_data): Likewise.
+ (finite_test_data): Likewise.
+ (floor_test_data): Likewise.
+ (fma_test_data): Likewise.
+ (fma_towardzero_test_data): Likewise.
+ (fma_downward_test_data): Likewise.
+ (fma_upward_test_data): Likewise.
+ (fmax_test_data): Likewise.
+ (fmin_test_data): Likewise.
+ (fmod_test_data): Likewise.
+ (fpclassify_test_data): Likewise.
+ (frexp_test_data): Likewise.
+ (gamma_test_data): Likewise.
+ (hypot_test_data): Likewise.
+ (ilogb_test_data): Likewise.
+ (isfinite_test_data): Likewise.
+ (isgreater_test_data): Likewise.
+ (isgreaterequal_test_data): Likewise.
+ (isinf_test_data): Likewise.
+ (isless_test_data): Likewise.
+ (islessequal_test_data): Likewise.
+ (islessgreater_test_data): Likewise.
+ (isnan_test_data): Likewise.
+ (isnormal_test_data): Likewise.
+ (issignaling_test_data): Likewise.
+ (isunordered_test_data): Likewise.
+ (j0_test_data): Likewise.
+ (j1_test_data): Likewise.
+ (jn_test_data): Likewise.
+ (ldexp_test_data): Likewise.
+ (lgamma_test_data): Likewise.
+ (lrint_test_data): Likewise.
+ (lrint_tonearest_test_data): Likewise.
+ (lrint_towardzero_test_data): Likewise.
+ (lrint_downward_test_data): Likewise.
+ (lrint_upward_test_data): Likewise.
+ (llrint_test_data): Likewise.
+ (llrint_tonearest_test_data): Likewise.
+ (llrint_towardzero_test_data): Likewise.
+ (llrint_downward_test_data): Likewise.
+ (llrint_upward_test_data): Likewise.
+ (log_test_data): Likewise.
+ (log10_test_data): Likewise.
+ (log1p_test_data): Likewise.
+ (log2_test_data): Likewise.
+ (logb_test_data): Likewise.
+ (logb_downward_test_data): Likewise.
+ (lround_test_data): Likewise.
+ (llround_test_data): Likewise.
+ (modf_test_data): Likewise.
+ (nearbyint_test_data): Likewise.
+ (nextafter_test_data): Likewise.
+ (nexttoward_test_data): Likewise.
+ (pow_test_data): Likewise.
+ (pow_tonearest_test_data): Likewise.
+ (pow_towardzero_test_data): Likewise.
+ (pow_downward_test_data): Likewise.
+ (pow_upward_test_data): Likewise.
+ (remainder_test_data): Likewise.
+ (remainder_tonearest_test_data): Likewise.
+ (remainder_towardzero_test_data): Likewise.
+ (remainder_downward_test_data): Likewise.
+ (remainder_upward_test_data): Likewise.
+ (remquo_test_data): Likewise.
+ (rint_test_data): Likewise.
+ (rint_tonearest_test_data): Likewise.
+ (rint_towardzero_test_data): Likewise.
+ (rint_downward_test_data): Likewise.
+ (rint_upward_test_data): Likewise.
+ (round_test_data): Likewise.
+ (scalb_test_data): Likewise.
+ (scalbn_test_data): Likewise.
+ (scalbln_test_data): Likewise.
+ (signbit_test_data): Likewise.
+ (sin_test_data): Likewise.
+ (sin_tonearest_test_data): Likewise.
+ (sin_towardzero_test_data): Likewise.
+ (sin_downward_test_data): Likewise.
+ (sin_upward_test_data): Likewise.
+ (sincos_test_data): Likewise.
+ (sinh_test_data): Likewise.
+ (sinh_tonearest_test_data): Likewise.
+ (sinh_towardzero_test_data): Likewise.
+ (sinh_downward_test_data): Likewise.
+ (sinh_upward_test_data): Likewise.
+ (sqrt_test_data): Likewise.
+ (tan_test_data): Likewise.
+ (tan_tonearest_test_data): Likewise.
+ (tan_towardzero_test_data): Likewise.
+ (tan_downward_test_data): Likewise.
+ (tan_upward_test_data): Likewise.
+ (tanh_test_data): Likewise.
+ (tgamma_test_data): Likewise.
+ (trunc_test_data): Likewise.
+ (y0_test_data): Likewise.
+ (y1_test_data): Likewise.
+ (yn_test_data): Likewise.
+ (significand_test_data): Likewise.
+
+ * math/gen-libm-test.pl (@functions): Remove variable.
+ (generate_testfile): Don't handle START and END lines.
+ * math/libm-test.inc (START): New macro.
+ (END): Likewise.
+ (END_COMPLEX): Likewise.
+ (acos_test): Use END macro without arguments.
+ (acos_test_tonearest): Likewise.
+ (acos_test_towardzero): Likewise.
+ (acos_test_downward): Likewise.
+ (acos_test_upward): Likewise.
+ (acosh_test): Likewise.
+ (asin_test): Likewise.
+ (asin_test_tonearest): Likewise.
+ (asin_test_towardzero): Likewise.
+ (asin_test_downward): Likewise.
+ (asin_test_upward): Likewise.
+ (asinh_test): Likewise.
+ (atan_test): Likewise.
+ (atanh_test): Likewise.
+ (atan2_test): Likewise.
+ (cabs_test): Likewise.
+ (cacos_test): Use END_COMPLEX macro without arguments.
+ (cacosh_test): Likewise.
+ (carg_test): Use END macro without arguments.
+ (casin_test): Use END_COMPLEX macro without arguments.
+ (casinh_test): Likewise.
+ (catan_test): Likewise.
+ (catanh_test): Likewise.
+ (cbrt_test): Use END macro without arguments.
+ (ccos_test): Use END_COMPLEX macro without arguments.
+ (ccosh_test): Likewise.
+ (ceil_test): Use END macro without arguments.
+ (cexp_test): Use END_COMPLEX macro without arguments.
+ (cimag_test): Use END macro without arguments.
+ (clog_test): Use END_COMPLEX macro without arguments.
+ (clog10_test): Likewise.
+ (conj_test): Likewise.
+ (copysign_test): Use END macro without arguments.
+ (cos_test): Likewise.
+ (cos_test_tonearest): Likewise.
+ (cos_test_towardzero): Likewise.
+ (cos_test_downward): Likewise.
+ (cos_test_upward): Likewise.
+ (cosh_test): Likewise.
+ (cosh_test_tonearest): Likewise.
+ (cosh_test_towardzero): Likewise.
+ (cosh_test_downward): Likewise.
+ (cosh_test_upward): Likewise.
+ (cpow_test): Use END_COMPLEX macro without arguments.
+ (cproj_test): Likewise.
+ (creal_test): Use END macro without arguments.
+ (csin_test): Use END_COMPLEX macro without arguments.
+ (csinh_test): Likewise.
+ (csqrt_test): Likewise.
+ (ctan_test): Likewise.
+ (ctan_test_tonearest): Likewise.
+ (ctan_test_towardzero): Likewise.
+ (ctan_test_downward): Likewise.
+ (ctan_test_upward): Likewise.
+ (ctanh_test): Likewise.
+ (ctanh_test_tonearest): Likewise.
+ (ctanh_test_towardzero): Likewise.
+ (ctanh_test_downward): Likewise.
+ (ctanh_test_upward): Likewise.
+ (erf_test): Use END macro without arguments.
+ (erfc_test): Likewise.
+ (exp_test): Likewise.
+ (exp_test_tonearest): Likewise.
+ (exp_test_towardzero): Likewise.
+ (exp_test_downward): Likewise.
+ (exp_test_upward): Likewise.
+ (exp10_test): Likewise.
+ (exp2_test): Likewise.
+ (expm1_test): Likewise.
+ (fabs_test): Likewise.
+ (fdim_test): Likewise.
+ (finite_test): Likewise.
+ (floor_test): Likewise.
+ (fma_test): Likewise.
+ (fma_test_towardzero): Likewise.
+ (fma_test_downward): Likewise.
+ (fma_test_upward): Likewise.
+ (fmax_test): Likewise.
+ (fmin_test): Likewise.
+ (fmod_test): Likewise.
+ (fpclassify_test): Likewise.
+ (frexp_test): Likewise.
+ (gamma_test): Likewise.
+ (hypot_test): Likewise.
+ (ilogb_test): Likewise.
+ (isfinite_test): Likewise.
+ (isgreater_test): Likewise.
+ (isgreaterequal_test): Likewise.
+ (isinf_test): Likewise.
+ (isless_test): Likewise.
+ (islessequal_test): Likewise.
+ (islessgreater_test): Likewise.
+ (isnan_test): Likewise.
+ (isnormal_test): Likewise.
+ (issignaling_test): Likewise.
+ (isunordered_test): Likewise.
+ (j0_test): Likewise.
+ (j1_test): Likewise.
+ (jn_test): Likewise.
+ (ldexp_test): Likewise.
+ (lgamma_test): Likewise.
+ (lrint_test): Likewise.
+ (lrint_test_tonearest): Likewise.
+ (lrint_test_towardzero): Likewise.
+ (lrint_test_downward): Likewise.
+ (lrint_test_upward): Likewise.
+ (llrint_test): Likewise.
+ (llrint_test_tonearest): Likewise.
+ (llrint_test_towardzero): Likewise.
+ (llrint_test_downward): Likewise.
+ (llrint_test_upward): Likewise.
+ (log_test): Likewise.
+ (log10_test): Likewise.
+ (log1p_test): Likewise.
+ (log2_test): Likewise.
+ (logb_test): Likewise.
+ (logb_test_downward): Likewise.
+ (lround_test): Likewise.
+ (llround_test): Likewise.
+ (modf_test): Likewise.
+ (nearbyint_test): Likewise.
+ (nextafter_test): Likewise.
+ (nexttoward_test): Likewise.
+ (pow_test): Likewise.
+ (pow_test_tonearest): Likewise.
+ (pow_test_towardzero): Likewise.
+ (pow_test_downward): Likewise.
+ (pow_test_upward): Likewise.
+ (remainder_test): Likewise.
+ (remainder_test_tonearest): Likewise.
+ (remainder_test_towardzero): Likewise.
+ (remainder_test_downward): Likewise.
+ (remainder_test_upward): Likewise.
+ (remquo_test): Likewise.
+ (rint_test): Likewise.
+ (rint_test_tonearest): Likewise.
+ (rint_test_towardzero): Likewise.
+ (rint_test_downward): Likewise.
+ (rint_test_upward): Likewise.
+ (round_test): Likewise.
+ (scalb_test): Likewise.
+ (scalbn_test): Likewise.
+ (scalbln_test): Likewise.
+ (signbit_test): Likewise.
+ (sin_test): Likewise.
+ (sin_test_tonearest): Likewise.
+ (sin_test_towardzero): Likewise.
+ (sin_test_downward): Likewise.
+ (sin_test_upward): Likewise.
+ (sincos_test): Likewise.
+ (sinh_test): Likewise.
+ (sinh_test_tonearest): Likewise.
+ (sinh_test_towardzero): Likewise.
+ (sinh_test_downward): Likewise.
+ (sinh_test_upward): Likewise.
+ (sqrt_test): Likewise.
+ (tan_test): Likewise.
+ (tan_test_tonearest): Likewise.
+ (tan_test_towardzero): Likewise.
+ (tan_test_downward): Likewise.
+ (tan_test_upward): Likewise.
+ (tanh_test): Likewise.
+ (tgamma_test): Likewise.
+ (trunc_test): Likewise.
+ (y0_test): Likewise.
+ (y1_test): Likewise.
+ (yn_test): Likewise.
+ (significand_test): Likewise.
+
+2013-05-24 OndÃÂej BÃÂlka <neleai@xxxxxxxxx>
+
+ [BZ #15381]
+ * libio/genops.c (_IO_no_init): Initialize wide struct info.
+
2013-05-23 Edjunior Machado <emachado@xxxxxxxxxxxxxxxxxx>
[BZ #14894]
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat May 25 00:01:54 2013
@@ -11,14 +11,15 @@
2546, 2560, 5159, 6809, 10060, 10062, 10357, 10686, 11120, 11561, 12387,
12723, 13550, 13889, 13951, 13988, 14142, 14176, 14200, 14280, 14293,
- 14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888, 14908, 14920,
- 14952, 14964, 14981, 14982, 14985, 14994, 14996, 15000, 15003, 15006,
- 15007, 15014, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15084,
- 15085, 15086, 15160, 15214, 15221, 15232, 15234, 15283, 15285, 15287,
- 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15339,
- 15342, 15346, 15359, 15361, 15366, 15380, 15394, 15395, 15405, 15406,
- 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429, 15441, 15442,
- 15448, 15480, 15485, 15488, 15490, 15493, 15497, 15506.
+ 14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888, 14894, 14908,
+ 14920, 14952, 14964, 14981, 14982, 14985, 14994, 14996, 15000, 15003,
+ 15006, 15007, 15014, 15020, 15023, 15036, 15054, 15055, 15062, 15078,
+ 15084, 15085, 15086, 15160, 15214, 15221, 15232, 15234, 15283, 15285,
+ 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337,
+ 15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394, 15395,
+ 15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429,
+ 15441, 15442, 15448, 15480, 15485, 15488, 15490, 15493, 15497, 15506,
+ 15529.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
Modified: fsf/trunk/libc/libio/genops.c
==============================================================================
--- fsf/trunk/libc/libio/genops.c (original)
+++ fsf/trunk/libc/libio/genops.c Sat May 25 00:01:54 2013
@@ -661,6 +661,10 @@
fp->_wide_data->_wide_vtable = jmp;
}
+ else
+ /* Cause predictable crash when a wide function is called on a byte
+ stream. */
+ fp->_wide_data = (struct _IO_wide_data *) -1L;
#endif
fp->_freeres_list = NULL;
}
Modified: fsf/trunk/libc/manual/platform.texi
==============================================================================
--- fsf/trunk/libc/manual/platform.texi (original)
+++ fsf/trunk/libc/manual/platform.texi Sat May 25 00:01:54 2013
@@ -57,4 +57,24 @@
dedicated to the executing processor are released until all outstanding storage
accesses to cacheable storage for which the data is not in the cache have been
completed.
+
+@deftypefun {void} __ppc_set_ppr_med (void)
+Set the Program Priority Register to medium value (default).
+
+The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
+the program's priority. By adjusting the PPR value the programmer may
+improve system throughput by causing the system resources to be used
+more efficiently, especially in contention situations.
+The three unprivileged states available are covered by the functions
+@code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
+and @code{__ppc_set_ppc_med_low} (medium low). More information
+available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
@end deftypefun
+
+@deftypefun {void} __ppc_set_ppr_low (void)
+Set the Program Priority Register to low value.
+@end deftypefun
+
+@deftypefun {void} __ppc_set_ppr_med_low (void)
+Set the Program Priority Register to medium low value.
+@end deftypefun
Modified: fsf/trunk/libc/math/gen-libm-test.pl
==============================================================================
--- fsf/trunk/libc/math/gen-libm-test.pl (original)
+++ fsf/trunk/libc/math/gen-libm-test.pl Sat May 25 00:01:54 2013
@@ -41,7 +41,6 @@
use vars qw ($input $output);
use vars qw (%results);
-use vars qw (@functions);
use vars qw (%beautify @all_floats);
use vars qw ($output_dir $ulps_file);
@@ -299,41 +298,6 @@
chop;
($descr, $args) = ($_ =~ /TEST_(\w+)\s*\((.*)\)/);
&parse_args (\*OUTPUT, $descr, $args);
- next;
- }
- # START_DATA (function)
- if (/START_DATA/) {
- next;
- }
- # START (function)
- if (/START/) {
- my ($thisfct);
- ($thisfct) = ($_ =~ /START\s*\((.*)\)/);
- print OUTPUT " const char *this_func = \"$thisfct\";\n";
- print OUTPUT " init_max_error ();\n";
- next;
- }
- # END_DATA (function)
- if (/END_DATA/) {
- next;
- }
- # END (function)
- if (/END/) {
- my ($fct, $line, $type);
- if (/complex/) {
- s/,\s*complex\s*//;
- $type = 'complex';
- } else {
- $type = 'normal';
- }
- ($fct) = ($_ =~ /END\s*\((.*)\)/);
- if ($type eq 'complex') {
- $line = " print_complex_max_error (\"$fct\");\n";
- } else {
- $line = " print_max_error (\"$fct\");\n";
- }
- print OUTPUT $line;
- push @functions, $fct;
next;
}
print OUTPUT;
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Sat May 25 00:01:54 2013
@@ -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
@@ -58,10 +58,8 @@
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:
@@ -271,6 +269,8 @@
#define MANT_DIG CHOOSE ((LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1), \
(LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1))
+#define MAX_EXP CHOOSE ((LDBL_MAX_EXP-1), (DBL_MAX_EXP-1), (FLT_MAX_EXP-1), \
+ (LDBL_MAX_EXP-1), (DBL_MAX_EXP-1), (FLT_MAX_EXP-1))
/* Compare KEY (a string, with the name of a test or a function) with
ULP (a pointer to a struct ulp_data structure), returning a value
@@ -657,6 +657,44 @@
test_single_errno (test_name, errno_value, ERANGE, "ERANGE");
}
+/* Returns the number of ulps that GIVEN is away from EXPECTED. */
+#define ULPDIFF(given, expected) \
+ (FUNC(fabs) ((given) - (expected)) / ulp (expected))
+
+/* Returns the size of an ulp for VALUE. */
+static FLOAT
+ulp (FLOAT value)
+{
+ FLOAT ulp;
+
+ switch (fpclassify (value))
+ {
+ case FP_ZERO:
+ /* We compute the distance to the next FP which is the same as the
+ value of the smallest subnormal number. Previously we used
+ 2^(-MANT_DIG) which is too large a value to be useful. Note that we
+ can't use ilogb(0), since that isn't a valid thing to do. As a point
+ of comparison Java's ulp returns the next normal value e.g.
+ 2^(1 - MAX_EXP) for ulp(0), but that is not what we want for
+ glibc. */
+ /* Fall through... */
+ case FP_SUBNORMAL:
+ /* The next closest subnormal value is a constant distance away. */
+ ulp = FUNC(ldexp) (1.0, 1 - (MAX_EXP + MANT_DIG));
+ break;
+
+ case FP_NORMAL:
+ ulp = FUNC(ldexp) (1.0, FUNC(ilogb) (value) - MANT_DIG);
+ break;
+
+ default:
+ /* It should never happen. */
+ abort ();
+ break;
+ }
+ return ulp;
+}
+
static void
check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
int exceptions,
@@ -665,7 +703,7 @@
int ok = 0;
int print_diff = 0;
FLOAT diff = 0;
- FLOAT ulp = 0;
+ FLOAT ulps = 0;
int errno_value = errno;
test_exceptions (test_name, exceptions);
@@ -696,37 +734,19 @@
else
{
diff = FUNC(fabs) (computed - expected);
- switch (fpclassify (expected))
- {
- case FP_ZERO:
- /* ilogb (0) isn't allowed. */
- ulp = diff / FUNC(ldexp) (1.0, - MANT_DIG);
- break;
- case FP_NORMAL:
- ulp = diff / FUNC(ldexp) (1.0, FUNC(ilogb) (expected) - MANT_DIG);
- break;
- case FP_SUBNORMAL:
- /* 1ulp for a subnormal value, shifted by MANT_DIG, is the
- least normal value. */
- ulp = (FUNC(ldexp) (diff, MANT_DIG) / min_value);
- break;
- default:
- /* It should never happen. */
- abort ();
- break;
- }
- set_max_error (ulp, curr_max_error);
+ ulps = ULPDIFF (computed, expected);
+ set_max_error (ulps, curr_max_error);
print_diff = 1;
if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
&& computed == 0.0 && expected == 0.0
&& signbit(computed) != signbit (expected))
ok = 0;
- else if (ulp <= 0.5 || (ulp <= max_ulp && !ignore_max_ulp))
+ else if (ulps <= 0.5 || (ulps <= max_ulp && !ignore_max_ulp))
ok = 1;
else
{
ok = 0;
- print_ulps (test_name, ulp);
+ print_ulps (test_name, ulps);
}
}
@@ -744,7 +764,7 @@
{
printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
"\n", diff, diff);
- printf (" ulp : % .4" PRINTF_NEXPR "\n", ulp);
+ printf (" ulp : % .4" PRINTF_NEXPR "\n", ulps);
printf (" max.ulp : % .4" PRINTF_NEXPR "\n", max_ulp);
}
}
@@ -1461,7 +1481,14 @@
(ARRAY)[i].extra2_expected); \
ROUND_RESTORE_ ## ROUNDING_MODE
-
+/* Start and end the tests for a given function. */
+#define START(FUNC) \
+ const char *this_func = #FUNC; \
+ init_max_error ()
+#define END \
+ print_max_error (this_func)
+#define END_COMPLEX \
+ print_complex_max_error (this_func)
/* This is to prevent messages from the SVID libm emulation. */
int
@@ -1478,7 +1505,6 @@
static const struct test_f_f_data acos_test_data[] =
{
- START_DATA (acos),
TEST_f_f (acos, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acos, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acos, qnan_value, qnan_value),
@@ -1510,7 +1536,6 @@
TEST_f_f (acos, 0x0.ffffffffffffffffp0L, 3.2927225399135962333718255320079907245059e-10L),
TEST_f_f (acos, -0x0.ffffffffffffffffp0L, 3.1415926532605209844712837599423203309964L),
#endif
- END_DATA (acos)
};
static void
@@ -1518,20 +1543,18 @@
{
START (acos);
RUN_TEST_LOOP_f_f (acos, acos_test_data, );
- END (acos);
+ END;
}
static const struct test_f_f_data acos_tonearest_test_data[] =
{
- START_DATA (acos_tonearest),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_tonearest)
};
static void
@@ -1539,20 +1562,18 @@
{
START (acos_tonearest);
RUN_TEST_LOOP_f_f (acos, acos_tonearest_test_data, FE_TONEAREST);
- END (acos_tonearest);
+ END;
}
static const struct test_f_f_data acos_towardzero_test_data[] =
{
- START_DATA (acos_towardzero),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_towardzero)
};
static void
@@ -1560,20 +1581,18 @@
{
START (acos_towardzero);
RUN_TEST_LOOP_f_f (acos, acos_towardzero_test_data, FE_TOWARDZERO);
- END (acos_towardzero);
+ END;
}
static const struct test_f_f_data acos_downward_test_data[] =
{
- START_DATA (acos_downward),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_downward)
};
static void
@@ -1581,20 +1600,18 @@
{
START (acos_downward);
RUN_TEST_LOOP_f_f (acos, acos_downward_test_data, FE_DOWNWARD);
- END (acos_downward);
+ END;
}
static const struct test_f_f_data acos_upward_test_data[] =
{
- START_DATA (acos_upward),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_upward)
};
static void
@@ -1602,12 +1619,11 @@
{
START (acos_upward);
RUN_TEST_LOOP_f_f (acos, acos_upward_test_data, FE_UPWARD);
- END (acos_upward);
+ END;
}
static const struct test_f_f_data acosh_test_data[] =
{
- START_DATA (acosh),
TEST_f_f (acosh, plus_infty, plus_infty),
TEST_f_f (acosh, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acosh, qnan_value, qnan_value),
@@ -1618,7 +1634,6 @@
TEST_f_f (acosh, 1, 0),
TEST_f_f (acosh, 7, 2.63391579384963341725009269461593689L),
- END_DATA (acosh)
};
static void
@@ -1626,12 +1641,11 @@
{
START (acosh);
RUN_TEST_LOOP_f_f (acosh, acosh_test_data, );
- END (acosh);
+ END;
}
static const struct test_f_f_data asin_test_data[] =
{
- START_DATA (asin),
TEST_f_f (asin, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (asin, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (asin, qnan_value, qnan_value),
@@ -1661,7 +1675,6 @@
TEST_f_f (asin, 0x0.ffffffffffffffffp0L, 1.5707963264656243652399620683025688888978L),
TEST_f_f (asin, -0x0.ffffffffffffffffp0L, -1.5707963264656243652399620683025688888978L),
#endif
- END_DATA (asin)
};
static void
@@ -1669,20 +1682,18 @@
{
START (asin);
RUN_TEST_LOOP_f_f (asin, asin_test_data, );
- END (asin);
+ END;
}
static const struct test_f_f_data asin_tonearest_test_data[] =
{
- START_DATA (asin_tonearest),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_tonearest)
};
static void
@@ -1690,20 +1701,18 @@
{
START (asin_tonearest);
RUN_TEST_LOOP_f_f (asin, asin_tonearest_test_data, FE_TONEAREST);
- END (asin_tonearest);
+ END;
}
static const struct test_f_f_data asin_towardzero_test_data[] =
{
- START_DATA (asin_towardzero),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_towardzero)
};
static void
@@ -1711,20 +1720,18 @@
{
START (asin_towardzero);
RUN_TEST_LOOP_f_f (asin, asin_towardzero_test_data, FE_TOWARDZERO);
- END (asin_towardzero);
+ END;
}
static const struct test_f_f_data asin_downward_test_data[] =
{
- START_DATA (asin_downward),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_downward)
};
static void
@@ -1732,20 +1739,18 @@
{
START (asin_downward);
RUN_TEST_LOOP_f_f (asin, asin_downward_test_data, FE_DOWNWARD);
- END (asin_downward);
+ END;
}
static const struct test_f_f_data asin_upward_test_data[] =
{
- START_DATA (asin_upward),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_upward)
};
static void
@@ -1753,12 +1758,11 @@
{
START (asin_upward);
RUN_TEST_LOOP_f_f (asin, asin_upward_test_data, FE_UPWARD);
- END (asin_upward);
+ END;
}
static const struct test_f_f_data asinh_test_data[] =
{
- START_DATA (asinh),
TEST_f_f (asinh, 0, 0),
TEST_f_f (asinh, minus_zero, minus_zero),
#ifndef TEST_INLINE
@@ -1767,7 +1771,6 @@
#endif
TEST_f_f (asinh, qnan_value, qnan_value),
TEST_f_f (asinh, 0.75L, 0.693147180559945309417232121458176568L),
- END_DATA (asinh)
};
static void
@@ -1775,12 +1778,11 @@
{
START (asinh);
RUN_TEST_LOOP_f_f (asinh, asinh_test_data, );
- END (asinh);
+ END;
}
static const struct test_f_f_data atan_test_data[] =
{
- START_DATA (atan),
TEST_f_f (atan, 0, 0),
TEST_f_f (atan, minus_zero, minus_zero),
@@ -1802,7 +1804,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_f_f (atan, 0x1p-10000L, 0x1p-10000L),
#endif
- END_DATA (atan)
};
static void
@@ -1810,14 +1811,13 @@
{
START (atan);
RUN_TEST_LOOP_f_f (atan, atan_test_data, );
- END (atan);
+ END;
}
static const struct test_f_f_data atanh_test_data[] =
{
- START_DATA (atanh),
TEST_f_f (atanh, 0, 0),
TEST_f_f (atanh, minus_zero, minus_zero),
@@ -1832,7 +1832,6 @@
TEST_f_f (atanh, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (atanh, 0.75L, 0.972955074527656652552676371721589865L),
- END_DATA (atanh)
};
static void
@@ -1840,12 +1839,11 @@
{
START (atanh);
RUN_TEST_LOOP_f_f (atanh, atanh_test_data, );
- END (atanh);
+ END;
}
static const struct test_ff_f_data atan2_test_data[] =
{
- START_DATA (atan2),
/* atan2 (0,x) == 0 for x > 0. */
TEST_ff_f (atan2, 0, 1, 0),
@@ -1916,7 +1914,6 @@
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
TEST_ff_f (atan2, 0x1.00000000000001p0L, 0x1.00000000000001p0L, M_PI_4l),
#endif
- END_DATA (atan2)
};
static void
@@ -1924,12 +1921,11 @@
{
START (atan2);
RUN_TEST_LOOP_ff_f (atan2, atan2_test_data, );
- END (atan2);
+ END;
}
static const struct test_c_f_data cabs_test_data[] =
{
- START_DATA (cabs);
/* cabs (x + iy) is specified as hypot (x,y) */
/* cabs (+inf + i x) == +inf. */
@@ -1961,7 +1957,6 @@
TEST_c_f (cabs, 5.7e7L, 0, 5.7e7L),
TEST_c_f (cabs, 0.75L, 1.25L, 1.45773797371132511771853821938639577L),
- END_DATA (cabs);
};
static void
@@ -1969,13 +1964,12 @@
{
START (cabs);
RUN_TEST_LOOP_c_f (cabs, cabs_test_data, );
- END (cabs);
+ END;
}
static const struct test_c_c_data cacos_test_data[] =
{
- START_DATA (cacos),
TEST_c_c (cacos, 0, 0, M_PI_2l, minus_zero),
TEST_c_c (cacos, minus_zero, 0, M_PI_2l, minus_zero),
TEST_c_c (cacos, minus_zero, minus_zero, M_PI_2l, 0.0),
@@ -2654,7 +2648,6 @@
TEST_c_c (cacos, 0.75L, 1.25L, 1.11752014915610270578240049553777969L, -1.13239363160530819522266333696834467L),
TEST_c_c (cacos, -2, -3, 2.1414491111159960199416055713254211L, 1.9833870299165354323470769028940395L),
- END_DATA (cacos)
};
static void
@@ -2662,12 +2655,11 @@
{
START (cacos);
RUN_TEST_LOOP_c_c (cacos, cacos_test_data, );
- END (cacos, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data cacosh_test_data[] =
{
- START_DATA (cacosh),
TEST_c_c (cacosh, 0, 0, 0.0, M_PI_2l),
TEST_c_c (cacosh, minus_zero, 0, 0.0, M_PI_2l),
TEST_c_c (cacosh, 0, minus_zero, 0.0, -M_PI_2l),
@@ -3340,7 +3332,6 @@
TEST_c_c (cacosh, 0.75L, 1.25L, 1.13239363160530819522266333696834467L, 1.11752014915610270578240049553777969L),
TEST_c_c (cacosh, -2, -3, 1.9833870299165354323470769028940395L, -2.1414491111159960199416055713254211L),
- END_DATA (cacosh)
};
static void
@@ -3348,13 +3339,12 @@
{
START (cacosh);
RUN_TEST_LOOP_c_c (cacosh, cacosh_test_data, );
- END (cacosh, complex);
+ END_COMPLEX;
}
static const struct test_c_f_data carg_test_data[] =
{
- START_DATA (carg);
/* carg (x + iy) is specified as atan2 (y, x) */
/* carg (x + i 0) == 0 for x > 0. */
@@ -3413,7 +3403,6 @@
TEST_c_f (carg, minus_infty, minus_infty, -M_PI_34l),
TEST_c_f (carg, qnan_value, qnan_value, qnan_value),
- END_DATA (carg);
};
static void
@@ -3421,12 +3410,11 @@
{
START (carg);
RUN_TEST_LOOP_c_f (carg, carg_test_data, );
- END (carg);
+ END;
}
static const struct test_c_c_data casin_test_data[] =
{
- START_DATA (casin),
TEST_c_c (casin, 0, 0, 0.0, 0.0),
TEST_c_c (casin, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (casin, 0, minus_zero, 0.0, minus_zero),
@@ -4109,7 +4097,6 @@
TEST_c_c (casin, 0.75L, 1.25L, 0.453276177638793913448921196101971749L, 1.13239363160530819522266333696834467L),
TEST_c_c (casin, -2, -3, -0.57065278432109940071028387968566963L, -1.9833870299165354323470769028940395L),
- END_DATA (casin)
};
static void
@@ -4117,13 +4104,12 @@
{
START (casin);
RUN_TEST_LOOP_c_c (casin, casin_test_data, );
- END (casin, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data casinh_test_data[] =
{
- START_DATA (casinh),
TEST_c_c (casinh, 0, 0, 0.0, 0.0),
TEST_c_c (casinh, minus_zero, 0, minus_zero, 0),
TEST_c_c (casinh, 0, minus_zero, 0.0, minus_zero),
@@ -4806,7 +4792,6 @@
TEST_c_c (casinh, 0.75L, 1.25L, 1.03171853444778027336364058631006594L, 0.911738290968487636358489564316731207L),
TEST_c_c (casinh, -2, -3, -1.9686379257930962917886650952454982L, -0.96465850440760279204541105949953237L),
- END_DATA (casinh)
};
static void
@@ -4814,13 +4799,12 @@
{
START (casinh);
RUN_TEST_LOOP_c_c (casinh, casinh_test_data, );
- END (casinh, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data catan_test_data[] =
{
- START_DATA (catan),
TEST_c_c (catan, 0, 0, 0, 0),
TEST_c_c (catan, minus_zero, 0, minus_zero, 0),
TEST_c_c (catan, 0, minus_zero, 0, minus_zero),
@@ -5317,7 +5301,6 @@
TEST_c_c (catan, 0.75L, 1.25L, 1.10714871779409050301706546017853704L, 0.549306144334054845697622618461262852L),
TEST_c_c (catan, -2, -3, -1.4099210495965755225306193844604208L, -0.22907268296853876629588180294200276L),
- END_DATA (catan)
};
static void
@@ -5325,12 +5308,11 @@
{
START (catan);
RUN_TEST_LOOP_c_c (catan, catan_test_data, );
- END (catan, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data catanh_test_data[] =
{
- START_DATA (catanh),
TEST_c_c (catanh, 0, 0, 0.0, 0.0),
TEST_c_c (catanh, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (catanh, 0, minus_zero, 0.0, minus_zero),
@@ -5826,7 +5808,6 @@
TEST_c_c (catanh, 0.75L, 1.25L, 0.261492138795671927078652057366532140L, 0.996825126463918666098902241310446708L),
TEST_c_c (catanh, -2, -3, -0.14694666622552975204743278515471595L, -1.3389725222944935611241935759091443L),
- END_DATA (catanh)
};
static void
@@ -5834,12 +5815,11 @@
{
START (catanh);
RUN_TEST_LOOP_c_c (catanh, catanh_test_data, );
- END (catanh, complex);
+ END_COMPLEX;
}
static const struct test_f_f_data cbrt_test_data[] =
{
- START_DATA (cbrt),
TEST_f_f (cbrt, 0.0, 0.0),
TEST_f_f (cbrt, minus_zero, minus_zero),
@@ -5852,7 +5832,6 @@
TEST_f_f (cbrt, -27.0, -3.0),
TEST_f_f (cbrt, 0.9921875L, 0.997389022060725270579075195353955217L),
TEST_f_f (cbrt, 0.75L, 0.908560296416069829445605878163630251L),
- END_DATA (cbrt)
};
static void
@@ -5860,13 +5839,12 @@
{
START (cbrt);
RUN_TEST_LOOP_f_f (cbrt, cbrt_test_data, );
- END (cbrt);
+ END;
}
static const struct test_c_c_data ccos_test_data[] =
{
- START_DATA (ccos),
TEST_c_c (ccos, 0.0, 0.0, 1.0, minus_zero),
TEST_c_c (ccos, minus_zero, 0.0, 1.0, 0.0),
TEST_c_c (ccos, 0.0, minus_zero, 1.0, 0.0),
@@ -5953,7 +5931,6 @@
TEST_c_c (ccos, min_subnorm_value * 0x1p120, 0x1p-120, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (ccos, 0x1p-120, min_subnorm_value * 0x1p120, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (ccos)
};
static void
@@ -5961,13 +5938,12 @@
{
START (ccos);
RUN_TEST_LOOP_c_c (ccos, ccos_test_data, );
- END (ccos, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ccosh_test_data[] =
{
- START_DATA (ccosh),
TEST_c_c (ccosh, 0.0, 0.0, 1.0, 0.0),
TEST_c_c (ccosh, minus_zero, 0.0, 1.0, minus_zero),
TEST_c_c (ccosh, 0.0, minus_zero, 1.0, minus_zero),
@@ -6055,7 +6031,6 @@
TEST_c_c (ccosh, min_subnorm_value * 0x1p120, 0x1p-120, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (ccosh, 0x1p-120, min_subnorm_value * 0x1p120, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (ccosh)
};
static void
@@ -6063,13 +6038,12 @@
{
START (ccosh);
RUN_TEST_LOOP_c_c (ccosh, ccosh_test_data, );
- END (ccosh, complex);
+ END_COMPLEX;
}
static const struct test_f_f_data ceil_test_data[] =
{
- START_DATA (ceil),
TEST_f_f (ceil, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (ceil, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_f_f (ceil, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
@@ -6155,7 +6129,6 @@
TEST_f_f (ceil, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L),
TEST_f_f (ceil, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L),
#endif
- END_DATA (ceil)
};
static void
@@ -6163,13 +6136,12 @@
{
START (ceil);
RUN_TEST_LOOP_f_f (ceil, ceil_test_data, );
- END (ceil);
+ END;
}
static const struct test_c_c_data cexp_test_data[] =
{
- START_DATA (cexp),
TEST_c_c (cexp, plus_zero, plus_zero, 1, 0.0),
TEST_c_c (cexp, minus_zero, plus_zero, 1, 0.0),
TEST_c_c (cexp, plus_zero, minus_zero, 1, minus_zero),
@@ -6265,7 +6237,6 @@
TEST_c_c (cexp, min_value, min_subnorm_value, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (cexp, min_value, -min_subnorm_value, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (cexp)
};
static void
@@ -6273,13 +6244,12 @@
{
START (cexp);
RUN_TEST_LOOP_c_c (cexp, cexp_test_data, );
- END (cexp, complex);
+ END_COMPLEX;
}
static const struct test_c_f_data cimag_test_data[] =
{
- START_DATA (cimag);
TEST_c_f (cimag, 1.0, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
@@ -6287,7 +6257,6 @@
TEST_c_f (cimag, 1.0, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 2.0, 3.0, 3.0, NO_INEXACT_EXCEPTION),
- END_DATA (cimag);
};
static void
@@ -6295,12 +6264,11 @@
{
START (cimag);
RUN_TEST_LOOP_c_f (cimag, cimag_test_data, );
- END (cimag);
+ END;
}
static const struct test_c_c_data clog_test_data[] =
{
- START_DATA (clog),
TEST_c_c (clog, minus_zero, 0, minus_infty, M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog, minus_zero, minus_zero, minus_infty, -M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
@@ -6506,7 +6474,6 @@
TEST_c_c (clog, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 4.6017338806965821566734340588575402712716e-67L, 1.3547418904611758959096647942223384691728L),
TEST_c_c (clog, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 2.5993421227864195179698176012564317527271e-67L, 1.4132318089683022770487383611430906982461L),
#endif
- END_DATA (clog)
};
static void
@@ -6514,13 +6481,12 @@
{
START (clog);
RUN_TEST_LOOP_c_c (clog, clog_test_data, );
- END (clog, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data clog10_test_data[] =
{
- START_DATA (clog10),
TEST_c_c (clog10, minus_zero, 0, minus_infty, M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
@@ -6725,7 +6691,6 @@
TEST_c_c (clog10, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 1.9985076315737626043096596036300177494613e-67L, 0.5883569274304683249184005177865521205198L),
TEST_c_c (clog10, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 1.1288799405048268615023706955013387413519e-67L, 0.6137587762850841972073301550420510507903L),
#endif
- END_DATA (clog10)
};
static void
@@ -6733,13 +6698,12 @@
{
START (clog10);
RUN_TEST_LOOP_c_c (clog10, clog10_test_data, );
- END (clog10, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data conj_test_data[] =
{
- START_DATA (conj),
TEST_c_c (conj, 0.0, 0.0, 0.0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 0.0, minus_zero, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, qnan_value, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
@@ -6747,7 +6711,6 @@
TEST_c_c (conj, plus_infty, plus_infty, plus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 1.0, 2.0, 1.0, -2.0, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 3.0, -4.0, 3.0, 4.0, NO_INEXACT_EXCEPTION),
- END_DATA (conj)
};
static void
@@ -6755,13 +6718,12 @@
{
START (conj);
RUN_TEST_LOOP_c_c (conj, conj_test_data, );
- END (conj, complex);
+ END_COMPLEX;
}
static const struct test_ff_f_data copysign_test_data[] =
{
- START_DATA (copysign),
TEST_ff_f (copysign, 0, 4, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, 0, -4, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, minus_zero, 4, 0, NO_INEXACT_EXCEPTION),
@@ -6782,7 +6744,6 @@
TEST_ff_f (copysign, qnan_value, minus_zero, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, -qnan_value, 0, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, -qnan_value, minus_zero, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (copysign)
};
static void
@@ -6790,13 +6751,12 @@
{
START (copysign);
RUN_TEST_LOOP_ff_f (copysign, copysign_test_data, );
- END (copysign);
+ END;
}
static const struct test_f_f_data cos_test_data[] =
{
- START_DATA (cos),
TEST_f_f (cos, 0, 1),
TEST_f_f (cos, minus_zero, 1),
TEST_f_f (cos, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
@@ -6857,7 +6817,6 @@
TEST_f_f (cos, 0x1.fffffep+127, 8.53021039830304158051791467692161107353094e-01L),
TEST_f_f (cos, 0x1p+50, 8.68095904660550604334592502063501320395739e-01L),
TEST_f_f (cos, 0x1p+28, -1.65568979490578758865468278195361551113358e-01L),
- END_DATA (cos)
};
static void
@@ -6865,13 +6824,12 @@
{
START (cos);
RUN_TEST_LOOP_f_f (cos, cos_test_data, );
- END (cos);
+ END;
}
static const struct test_f_f_data cos_tonearest_test_data[] =
{
- START_DATA (cos_tonearest),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
@@ -6882,7 +6840,6 @@
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_tonearest)
};
static void
@@ -6890,13 +6847,12 @@
{
START (cos_tonearest);
RUN_TEST_LOOP_f_f (cos, cos_tonearest_test_data, FE_TONEAREST);
- END (cos_tonearest);
+ END;
}
static const struct test_f_f_data cos_towardzero_test_data[] =
{
- START_DATA (cos_towardzero),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
@@ -6907,7 +6863,6 @@
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_towardzero)
};
static void
@@ -6915,13 +6870,12 @@
{
START (cos_towardzero);
RUN_TEST_LOOP_f_f (cos, cos_towardzero_test_data, FE_TOWARDZERO);
- END (cos_towardzero);
+ END;
}
static const struct test_f_f_data cos_downward_test_data[] =
{
- START_DATA (cos_downward),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
@@ -6932,7 +6886,6 @@
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_downward)
};
static void
@@ -6940,13 +6893,12 @@
{
START (cos_downward);
RUN_TEST_LOOP_f_f (cos, cos_downward_test_data, FE_DOWNWARD);
- END (cos_downward);
+ END;
}
static const struct test_f_f_data cos_upward_test_data[] =
{
- START_DATA (cos_upward),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
@@ -6957,7 +6909,6 @@
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_upward)
};
static void
@@ -6965,13 +6916,12 @@
{
START (cos_upward);
RUN_TEST_LOOP_f_f (cos, cos_upward_test_data, FE_UPWARD);
- END (cos_upward);
+ END;
}
static const struct test_f_f_data cosh_test_data[] =
{
- START_DATA (cosh),
TEST_f_f (cosh, 0, 1),
TEST_f_f (cosh, minus_zero, 1),
@@ -6987,7 +6937,6 @@
TEST_f_f (cosh, 709.8893558127259666434838436543941497802734375L, 9.9999998999995070652573675944761818416035e+307L),
TEST_f_f (cosh, -709.8893558127259666434838436543941497802734375L, 9.9999998999995070652573675944761818416035e+307L),
#endif
- END_DATA (cosh)
};
static void
@@ -6995,17 +6944,15 @@
{
START (cosh);
RUN_TEST_LOOP_f_f (cosh, cosh_test_data, );
- END (cosh);
+ END;
}
static const struct test_f_f_data cosh_tonearest_test_data[] =
{
- START_DATA (cosh_tonearest),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_tonearest)
};
static void
@@ -7013,17 +6960,15 @@
{
START (cosh_tonearest);
RUN_TEST_LOOP_f_f (cosh, cosh_tonearest_test_data, FE_TONEAREST);
- END (cosh_tonearest);
+ END;
}
static const struct test_f_f_data cosh_towardzero_test_data[] =
{
- START_DATA (cosh_towardzero),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_towardzero)
};
static void
@@ -7031,17 +6976,15 @@
{
START (cosh_towardzero);
RUN_TEST_LOOP_f_f (cosh, cosh_towardzero_test_data, FE_TOWARDZERO);
- END (cosh_towardzero);
+ END;
}
static const struct test_f_f_data cosh_downward_test_data[] =
{
- START_DATA (cosh_downward),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_downward)
};
static void
@@ -7049,17 +6992,15 @@
{
START (cosh_downward);
RUN_TEST_LOOP_f_f (cosh, cosh_downward_test_data, FE_DOWNWARD);
- END (cosh_downward);
+ END;
}
static const struct test_f_f_data cosh_upward_test_data[] =
{
- START_DATA (cosh_upward),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_upward)
};
static void
@@ -7067,17 +7008,18 @@
{
START (cosh_upward);
RUN_TEST_LOOP_f_f (cosh, cosh_upward_test_data, FE_UPWARD);
- END (cosh_upward);
+ END;
}
static const struct test_cc_c_data cpow_test_data[] =
{
- START_DATA (cpow),
TEST_cc_c (cpow, 1, 0, 0, 0, 1.0, 0.0),
TEST_cc_c (cpow, 2, 0, 10, 0, 1024.0, 0.0),
-
+#if 0
+ /* Disabled until we fix bug 14473. */
TEST_cc_c (cpow, M_El, 0, 0, 2 * M_PIl, 1.0, 0.0),
+#endif
TEST_cc_c (cpow, 2, 3, 4, 0, -119.0, -120.0),
TEST_cc_c (cpow, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value),
@@ -7086,7 +7028,6 @@
TEST_cc_c (cpow, 0.75L, 1.25L, 1.0L, 1.0L, 0.0846958290317209430433805274189191353L, 0.513285749182902449043287190519090481L),
TEST_cc_c (cpow, 0.75L, 1.25L, 1.0L, 0.0L, 0.75L, 1.25L),
TEST_cc_c (cpow, 0.75L, 1.25L, 0.0L, 1.0L, 0.331825439177608832276067945276730566L, 0.131338600281188544930936345230903032L),
- END_DATA (cpow)
};
static void
@@ -7094,13 +7035,12 @@
{
START (cpow);
RUN_TEST_LOOP_cc_c (cpow, cpow_test_data, );
- END (cpow, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data cproj_test_data[] =
{
- START_DATA (cproj),
TEST_c_c (cproj, 0.0, 0.0, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, minus_zero, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, 0.0, minus_zero, 0.0, minus_zero, NO_INEXACT_EXCEPTION),
@@ -7115,7 +7055,6 @@
TEST_c_c (cproj, 1.0, 0.0, 1.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, 2.0, 3.0, 2.0, 3.0, NO_INEXACT_EXCEPTION),
- END_DATA (cproj)
};
static void
@@ -7123,13 +7062,12 @@
{
START (cproj);
RUN_TEST_LOOP_c_c (cproj, cproj_test_data, );
- END (cproj, complex);
+ END_COMPLEX;
}
static const struct test_c_f_data creal_test_data[] =
{
- START_DATA (creal);
TEST_c_f (creal, 0.0, 1.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, minus_zero, 1.0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, qnan_value, 1.0, qnan_value, NO_INEXACT_EXCEPTION),
@@ -7137,7 +7075,6 @@
TEST_c_f (creal, plus_infty, 1.0, plus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, minus_infty, 1.0, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, 2.0, 3.0, 2.0, NO_INEXACT_EXCEPTION),
- END_DATA (creal);
};
static void
@@ -7145,12 +7082,11 @@
{
START (creal);
RUN_TEST_LOOP_c_f (creal, creal_test_data, );
- END (creal);
+ END;
}
static const struct test_c_c_data csin_test_data[] =
{
- START_DATA (csin),
TEST_c_c (csin, 0.0, 0.0, 0.0, 0.0),
TEST_c_c (csin, minus_zero, 0.0, minus_zero, 0.0),
TEST_c_c (csin, 0.0, minus_zero, 0, minus_zero),
@@ -7237,7 +7173,6 @@
TEST_c_c (csin, min_subnorm_value, min_value, min_subnorm_value, min_value, UNDERFLOW_EXCEPTION),
TEST_c_c (csin, min_value, min_subnorm_value, min_value, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (csin)
};
static void
@@ -7245,13 +7180,12 @@
{
START (csin);
RUN_TEST_LOOP_c_c (csin, csin_test_data, );
- END (csin, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data csinh_test_data[] =
{
- START_DATA (csinh),
TEST_c_c (csinh, 0.0, 0.0, 0.0, 0.0),
TEST_c_c (csinh, minus_zero, 0.0, minus_zero, 0.0),
TEST_c_c (csinh, 0.0, minus_zero, 0.0, minus_zero),
@@ -7338,7 +7272,6 @@
TEST_c_c (csinh, min_subnorm_value, min_value, min_subnorm_value, min_value, UNDERFLOW_EXCEPTION),
TEST_c_c (csinh, min_value, min_subnorm_value, min_value, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (csinh)
};
static void
@@ -7346,13 +7279,12 @@
{
START (csinh);
RUN_TEST_LOOP_c_c (csinh, csinh_test_data, );
- END (csinh, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data csqrt_test_data[] =
{
- START_DATA (csqrt),
TEST_c_c (csqrt, 0, 0, 0.0, 0.0),
TEST_c_c (csqrt, 0, minus_zero, 0, minus_zero),
TEST_c_c (csqrt, minus_zero, 0, 0.0, 0.0),
@@ -7459,7 +7391,6 @@
TEST_c_c (csqrt, -0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-16382L, 8.344545284118961663847948339519226074126e-2467L, -2.014551439675644900022606748976158925145e-2466L),
# endif
#endif
- END_DATA (csqrt)
};
static void
@@ -7467,12 +7398,11 @@
{
START (csqrt);
RUN_TEST_LOOP_c_c (csqrt, csqrt_test_data, );
- END (csqrt, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctan_test_data[] =
{
- START_DATA (ctan),
TEST_c_c (ctan, 0, 0, 0.0, 0.0),
TEST_c_c (ctan, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (ctan, minus_zero, 0, minus_zero, 0.0),
@@ -7545,7 +7475,6 @@
TEST_c_c (ctan, 50000, -50000, plus_zero, -1.0, UNDERFLOW_EXCEPTION),
TEST_c_c (ctan, -50000, 50000, minus_zero, 1.0, UNDERFLOW_EXCEPTION),
TEST_c_c (ctan, -50000, -50000, minus_zero, -1.0, UNDERFLOW_EXCEPTION),
- END_DATA (ctan)
};
static void
@@ -7553,13 +7482,12 @@
{
START (ctan);
RUN_TEST_LOOP_c_c (ctan, ctan_test_data, );
- END (ctan, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctan_tonearest_test_data[] =
{
- START_DATA (ctan_tonearest),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
@@ -7569,7 +7497,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_tonearest)
};
static void
@@ -7577,13 +7504,12 @@
{
START (ctan_tonearest);
RUN_TEST_LOOP_c_c (ctan, ctan_tonearest_test_data, FE_TONEAREST);
- END (ctan_tonearest, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctan_towardzero_test_data[] =
{
- START_DATA (ctan_towardzero),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
@@ -7593,7 +7519,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_towardzero)
};
static void
@@ -7601,13 +7526,12 @@
{
START (ctan_towardzero);
RUN_TEST_LOOP_c_c (ctan, ctan_towardzero_test_data, FE_TOWARDZERO);
- END (ctan_towardzero, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctan_downward_test_data[] =
{
- START_DATA (ctan_downward),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
@@ -7617,7 +7541,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_downward)
};
static void
@@ -7625,13 +7548,12 @@
{
START (ctan_downward);
RUN_TEST_LOOP_c_c (ctan, ctan_downward_test_data, FE_DOWNWARD);
- END (ctan_downward, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctan_upward_test_data[] =
{
- START_DATA (ctan_upward),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
@@ -7641,7 +7563,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_upward)
};
static void
@@ -7649,13 +7570,12 @@
{
START (ctan_upward);
RUN_TEST_LOOP_c_c (ctan, ctan_upward_test_data, FE_UPWARD);
- END (ctan_upward, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctanh_test_data[] =
{
- START_DATA (ctanh),
TEST_c_c (ctanh, 0, 0, 0.0, 0.0),
TEST_c_c (ctanh, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (ctanh, minus_zero, 0, minus_zero, 0.0),
@@ -7729,7 +7649,6 @@
TEST_c_c (ctanh, 50000, -50000, 1.0, minus_zero, UNDERFLOW_EXCEPTION),
TEST_c_c (ctanh, -50000, 50000, -1.0, plus_zero, UNDERFLOW_EXCEPTION),
TEST_c_c (ctanh, -50000, -50000, -1.0, minus_zero, UNDERFLOW_EXCEPTION),
- END_DATA (ctanh)
};
static void
@@ -7737,13 +7656,12 @@
{
START (ctanh);
RUN_TEST_LOOP_c_c (ctanh, ctanh_test_data, );
- END (ctanh, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctanh_tonearest_test_data[] =
{
- START_DATA (ctanh_tonearest),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
@@ -7753,7 +7671,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_tonearest)
};
static void
@@ -7761,13 +7678,12 @@
{
START (ctanh_tonearest);
RUN_TEST_LOOP_c_c (ctanh, ctanh_tonearest_test_data, FE_TONEAREST);
- END (ctanh_tonearest, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctanh_towardzero_test_data[] =
{
- START_DATA (ctanh_towardzero),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
@@ -7777,7 +7693,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_towardzero)
};
static void
@@ -7785,13 +7700,12 @@
{
START (ctanh_towardzero);
RUN_TEST_LOOP_c_c (ctanh, ctanh_towardzero_test_data, FE_TOWARDZERO);
- END (ctanh_towardzero, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctanh_downward_test_data[] =
{
- START_DATA (ctanh_downward),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
@@ -7801,7 +7715,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_downward)
};
static void
@@ -7809,13 +7722,12 @@
{
START (ctanh_downward);
RUN_TEST_LOOP_c_c (ctanh, ctanh_downward_test_data, FE_DOWNWARD);
- END (ctanh_downward, complex);
+ END_COMPLEX;
}
static const struct test_c_c_data ctanh_upward_test_data[] =
{
- START_DATA (ctanh_upward),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
@@ -7825,7 +7737,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_upward)
};
static void
@@ -7833,13 +7744,12 @@
{
START (ctanh_upward);
RUN_TEST_LOOP_c_c (ctanh, ctanh_upward_test_data, FE_UPWARD);
- END (ctanh_upward, complex);
+ END_COMPLEX;
}
static const struct test_f_f_data erf_test_data[] =
{
- START_DATA (erf),
TEST_f_f (erf, 0, 0),
TEST_f_f (erf, minus_zero, minus_zero),
TEST_f_f (erf, plus_infty, 1),
@@ -7852,7 +7762,6 @@
TEST_f_f (erf, 2.0L, 0.995322265018952734162069256367252929L),
TEST_f_f (erf, 4.125L, 0.999999994576599200434933994687765914L),
TEST_f_f (erf, 27.0L, 1.0L),
- END_DATA (erf)
};
static void
@@ -7860,13 +7769,12 @@
{
START (erf);
RUN_TEST_LOOP_f_f (erf, erf_test_data, );
- END (erf);
+ END;
}
static const struct test_f_f_data erfc_test_data[] =
{
- START_DATA (erfc),
TEST_f_f (erfc, plus_infty, 0.0),
TEST_f_f (erfc, minus_infty, 2.0),
TEST_f_f (erfc, 0.0, 1.0),
@@ -7890,7 +7798,6 @@
TEST_f_f (erfc, 0x1.ffff56789abcdef0123456789a8p+2L, 1.123161416304655390092138725253789378459e-29L),
# endif
#endif
- END_DATA (erfc)
};
static void
@@ -7898,13 +7805,12 @@
{
START (erfc);
RUN_TEST_LOOP_f_f (erfc, erfc_test_data, );
- END (erfc);
+ END;
}
static const struct test_f_f_data exp_test_data[] =
{
- START_DATA (exp),
TEST_f_f (exp, 0, 1),
TEST_f_f (exp, minus_zero, 1),
@@ -7935,7 +7841,6 @@
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),
- END_DATA (exp)
};
static void
@@ -7943,17 +7848,15 @@
{
START (exp);
RUN_TEST_LOOP_f_f (exp, exp_test_data, );
- END (exp);
+ END;
}
static const struct test_f_f_data exp_tonearest_test_data[] =
{
- START_DATA (exp_tonearest),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_tonearest)
};
static void
@@ -7961,17 +7864,15 @@
{
START (exp_tonearest);
RUN_TEST_LOOP_f_f (exp, exp_tonearest_test_data, FE_TONEAREST);
- END (exp_tonearest);
+ END;
}
static const struct test_f_f_data exp_towardzero_test_data[] =
{
- START_DATA (exp_towardzero),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_towardzero)
};
static void
@@ -7979,17 +7880,15 @@
{
START (exp_towardzero);
RUN_TEST_LOOP_f_f (exp, exp_towardzero_test_data, FE_TOWARDZERO);
- END (exp_towardzero);
+ END;
}
static const struct test_f_f_data exp_downward_test_data[] =
{
- START_DATA (exp_downward),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_downward)
};
static void
@@ -7997,17 +7896,15 @@
{
START (exp_downward);
RUN_TEST_LOOP_f_f (exp, exp_downward_test_data, FE_DOWNWARD);
- END (exp_downward);
+ END;
}
static const struct test_f_f_data exp_upward_test_data[] =
{
- START_DATA (exp_upward),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_upward)
};
static void
@@ -8015,13 +7912,12 @@
{
START (exp_upward);
RUN_TEST_LOOP_f_f (exp, exp_upward_test_data, FE_UPWARD);
- END (exp_upward);
+ END;
}
static const struct test_f_f_data exp10_test_data[] =
{
- START_DATA (exp10),
TEST_f_f (exp10, 0, 1),
TEST_f_f (exp10, minus_zero, 1),
@@ -8045,7 +7941,6 @@
TEST_f_f (exp10, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (exp10, -max_value, 0, UNDERFLOW_EXCEPTION),
TEST_f_f (exp10, 0.75L, 5.62341325190349080394951039776481231L),
- END_DATA (exp10)
};
static void
@@ -8053,13 +7948,21 @@
{
START (exp10);
RUN_TEST_LOOP_f_f (exp10, exp10_test_data, );
- END (exp10);
+ 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[] =
{
- START_DATA (exp2),
TEST_f_f (exp2, 0, 1),
TEST_f_f (exp2, minus_zero, 1),
TEST_f_f (exp2, plus_infty, plus_infty),
@@ -8088,7 +7991,6 @@
TEST_f_f (exp2, 16383, 0x1p16383L),
TEST_f_f (exp2, -16400, 0x1p-16400L),
#endif
- END_DATA (exp2)
};
static void
@@ -8096,13 +7998,12 @@
{
START (exp2);
RUN_TEST_LOOP_f_f (exp2, exp2_test_data, );
- END (exp2);
+ END;
}
static const struct test_f_f_data expm1_test_data[] =
{
- START_DATA (expm1),
TEST_f_f (expm1, 0, 0),
TEST_f_f (expm1, minus_zero, minus_zero),
@@ -8150,7 +8051,6 @@
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),
- END_DATA (expm1)
};
static void
@@ -8158,13 +8058,12 @@
{
START (expm1);
RUN_TEST_LOOP_f_f (expm1, expm1_test_data, );
- END (expm1);
+ END;
}
static const struct test_f_f_data fabs_test_data[] =
{
- START_DATA (fabs),
TEST_f_f (fabs, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_f (fabs, minus_zero, 0, NO_INEXACT_EXCEPTION),
@@ -8174,7 +8073,6 @@
TEST_f_f (fabs, 38.0, 38.0, NO_INEXACT_EXCEPTION),
TEST_f_f (fabs, -M_El, M_El, NO_INEXACT_EXCEPTION),
- END_DATA (fabs)
};
static void
@@ -8182,13 +8080,12 @@
{
START (fabs);
RUN_TEST_LOOP_f_f (fabs, fabs_test_data, );
- END (fabs);
+ END;
}
static const struct test_ff_f_data fdim_test_data[] =
{
- START_DATA (fdim),
TEST_ff_f (fdim, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, 9, 0, 9, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, 0, 9, 0, NO_INEXACT_EXCEPTION),
@@ -8216,7 +8113,6 @@
TEST_ff_f (fdim, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, plus_infty, plus_infty, 0, NO_INEXACT_EXCEPTION),
- END_DATA (fdim)
};
static void
@@ -8224,35 +8120,12 @@
{
START (fdim);
RUN_TEST_LOOP_ff_f (fdim, fdim_test_data, );
- END (fdim);
-}
-
-
-static const struct test_f_i_data finite_test_data[] =
- {
- START_DATA (finite),
- TEST_f_b (finite, 0, 1, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, minus_zero, 1, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, 10, 1, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, min_subnorm_value, 1, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, plus_infty, 0, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, minus_infty, 0, NO_INEXACT_EXCEPTION),
- TEST_f_b (finite, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (finite)
- };
-
-static void
-finite_test (void)
-{
- START (finite);
- RUN_TEST_LOOP_f_b (finite, finite_test_data, );
- END (finite);
+ END;
}
static const struct test_f_f_data floor_test_data[] =
{
- START_DATA (floor),
TEST_f_f (floor, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (floor, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_f_f (floor, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
@@ -8345,7 +8218,6 @@
TEST_f_f (floor, 0xf.ffffffffffffff8p+47L, 0xf.fffffffffffep+47L),
TEST_f_f (floor, -0x8.000000000000004p+48L, -0x8.000000000001p+48L),
#endif
- END_DATA (floor)
};
static void
@@ -8353,13 +8225,12 @@
{
START (floor);
RUN_TEST_LOOP_f_f (floor, floor_test_data, );
- END (floor);
+ END;
}
static const struct test_fff_f_data fma_test_data[] =
{
- START_DATA (fma),
TEST_fff_f (fma, 1.0, 2.0, 3.0, 5.0),
TEST_fff_f (fma, qnan_value, 2.0, 3.0, qnan_value),
TEST_fff_f (fma, 1.0, qnan_value, 3.0, qnan_value),
@@ -8639,7 +8510,6 @@
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma)
};
static void
@@ -8647,13 +8517,12 @@
{
START (fma);
RUN_TEST_LOOP_fff_f (fma, fma_test_data, );
- END (fma);
+ END;
}
static const struct test_fff_f_data fma_towardzero_test_data[] =
{
- START_DATA (fma_towardzero),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero),
@@ -8856,7 +8725,6 @@
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x0.ffffffffffffffffffffffffffff8p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma_towardzero)
};
static void
@@ -8864,13 +8732,12 @@
{
START (fma_towardzero);
RUN_TEST_LOOP_fff_f (fma, fma_towardzero_test_data, FE_TOWARDZERO);
- END (fma_towardzero);
+ END;
}
static const struct test_fff_f_data fma_downward_test_data[] =
{
- START_DATA (fma_downward),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, minus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, minus_zero),
@@ -9073,7 +8940,6 @@
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1.0000000000000000000000000001p16319L),
#endif
- END_DATA (fma_downward)
};
static void
@@ -9081,13 +8947,12 @@
{
START (fma_downward);
RUN_TEST_LOOP_fff_f (fma, fma_downward_test_data, FE_DOWNWARD);
- END (fma_downward);
+ END;
}
static const struct test_fff_f_data fma_upward_test_data[] =
{
- START_DATA (fma_upward),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero),
@@ -9290,7 +9155,6 @@
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x0.ffffffffffffffffffffffffffff8p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma_upward)
};
static void
@@ -9298,13 +9162,12 @@
{
START (fma_upward);
RUN_TEST_LOOP_fff_f (fma, fma_upward_test_data, FE_UPWARD);
- END (fma_upward);
+ END;
}
static const struct test_ff_f_data fmax_test_data[] =
{
- START_DATA (fmax),
TEST_ff_f (fmax, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, 9, 0, 9, NO_INEXACT_EXCEPTION),
@@ -9333,7 +9196,6 @@
TEST_ff_f (fmax, qnan_value, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, qnan_value, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (fmax)
};
static void
@@ -9341,13 +9203,12 @@
{
START (fmax);
RUN_TEST_LOOP_ff_f (fmax, fmax_test_data, );
- END (fmax);
+ END;
}
static const struct test_ff_f_data fmin_test_data[] =
{
- START_DATA (fmin),
TEST_ff_f (fmin, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, 9, 0, 0, NO_INEXACT_EXCEPTION),
@@ -9375,7 +9236,6 @@
TEST_ff_f (fmin, qnan_value, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, qnan_value, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (fmin)
};
static void
@@ -9383,13 +9243,12 @@
{
START (fmin);
RUN_TEST_LOOP_ff_f (fmin, fmin_test_data, );
- END (fmin);
+ END;
}
static const struct test_ff_f_data fmod_test_data[] =
{
- START_DATA (fmod),
/* fmod (+0, y) == +0 for y != 0. */
TEST_ff_f (fmod, 0, 3, 0, NO_INEXACT_EXCEPTION),
@@ -9424,7 +9283,6 @@
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_ff_f (fmod, 0x0.fffffffffffffffep-16382L, 0x1p-16445L, plus_zero, NO_INEXACT_EXCEPTION),
#endif
- END_DATA (fmod)
};
static void
@@ -9432,13 +9290,12 @@
{
START (fmod);
RUN_TEST_LOOP_ff_f (fmod, fmod_test_data, );
- END (fmod);
+ END;
}
static const struct test_f_i_data fpclassify_test_data[] =
{
- START_DATA (fpclassify),
TEST_f_i (fpclassify, qnan_value, FP_NAN, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, plus_infty, FP_INFINITE, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, minus_infty, FP_INFINITE, NO_INEXACT_EXCEPTION),
@@ -9446,7 +9303,6 @@
TEST_f_i (fpclassify, minus_zero, FP_ZERO, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, 1000, FP_NORMAL, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, min_subnorm_value, FP_SUBNORMAL, NO_INEXACT_EXCEPTION),
- END_DATA (fpclassify)
};
static void
@@ -9454,13 +9310,12 @@
{
START (fpclassify);
RUN_TEST_LOOP_f_i_tg (fpclassify, fpclassify_test_data, );
- END (fpclassify);
+ END;
}
static const struct test_f_f1_data frexp_test_data[] =
{
- START_DATA (frexp),
TEST_fI_f1 (frexp, plus_infty, plus_infty, IGNORE, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, minus_infty, minus_infty, IGNORE, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, qnan_value, qnan_value, IGNORE, NO_INEXACT_EXCEPTION),
@@ -9470,7 +9325,6 @@
TEST_fI_f1 (frexp, 12.8L, 0.8L, 4, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, -27.34L, -0.854375L, 5, NO_INEXACT_EXCEPTION),
- END_DATA (frexp)
};
static void
@@ -9480,38 +9334,11 @@
START (frexp);
RUN_TEST_LOOP_fI_f1 (frexp, frexp_test_data, , x);
- END (frexp);
-}
-
-
-static const struct test_f_f1_data gamma_test_data[] =
- {
- START_DATA (gamma),
- TEST_f_f1 (gamma, plus_infty, plus_infty, 1),
- TEST_f_f1 (gamma, 0, plus_infty, 1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
- TEST_f_f1 (gamma, -3, plus_infty, IGNORE, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
- TEST_f_f1 (gamma, minus_infty, plus_infty, IGNORE),
- TEST_f_f1 (gamma, qnan_value, qnan_value, IGNORE),
-
- TEST_f_f1 (gamma, 1, 0, 1),
- TEST_f_f1 (gamma, 3, M_LN2l, 1),
-
- TEST_f_f1 (gamma, 0.5, M_LOG_SQRT_PIl, 1),
- TEST_f_f1 (gamma, -0.5, M_LOG_2_SQRT_PIl, -1),
- END_DATA (gamma)
- };
-
-static void
-gamma_test (void)
-{
- START (gamma);
- RUN_TEST_LOOP_f_f1 (gamma, gamma_test_data, , signgam);
- END (gamma);
+ END;
}
static const struct test_ff_f_data hypot_test_data[] =
{
- START_DATA (hypot),
TEST_ff_f (hypot, plus_infty, 1, plus_infty),
TEST_ff_f (hypot, minus_infty, 1, plus_infty),
@@ -9560,7 +9387,19 @@
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 && !defined TEST_INLINE
TEST_ff_f (hypot, 0x3p16381L, 0x4p16381L, 0x5p16381L),
#endif
- END_DATA (hypot)
+
+ TEST_ff_f (hypot, 0x1p-149L, 0x1p-149L, 1.9817352931807469938024533350782879785095e-45L, UNDERFLOW_EXCEPTION_FLOAT),
+
+#ifndef TEST_FLOAT
+ TEST_ff_f (hypot, 0x1p-1074L, 0x1p-1074L, 6.9871433705131320800651344656990806305791e-324L, UNDERFLOW_EXCEPTION_DOUBLE),
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381 && !defined TEST_INLINE
+ TEST_ff_f (hypot, 0x1p-16445L, 0x1p-16445L, 5.1550906155442528702558159159596215039925e-4951L, UNDERFLOW_EXCEPTION),
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (hypot, 0x1p-16494L, 0x1p-16494L, 9.1572804726500807075521065242888978445857e-4966L, UNDERFLOW_EXCEPTION),
+# endif
+#endif
};
static void
@@ -9568,13 +9407,12 @@
{
START (hypot);
RUN_TEST_LOOP_ff_f (hypot, hypot_test_data, );
- END (hypot);
+ END;
}
static const struct test_f_i_data ilogb_test_data[] =
{
- START_DATA (ilogb),
TEST_f_i (ilogb, 1, 0, NO_INEXACT_EXCEPTION),
TEST_f_i (ilogb, M_El, 1, NO_INEXACT_EXCEPTION),
TEST_f_i (ilogb, 1024, 10, NO_INEXACT_EXCEPTION),
@@ -9588,7 +9426,6 @@
TEST_f_i (ilogb, plus_infty, INT_MAX, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
/* ilogb (-inf) == INT_MAX plus invalid exception */
TEST_f_i (ilogb, minus_infty, INT_MAX, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
- END_DATA (ilogb)
};
static void
@@ -9596,12 +9433,11 @@
{
START (ilogb);
RUN_TEST_LOOP_f_i (ilogb, ilogb_test_data, );
- END (ilogb);
+ END;
}
static const struct test_f_i_data isfinite_test_data[] =
{
- START_DATA (isfinite),
TEST_f_b (isfinite, 0, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, 10, 1, NO_INEXACT_EXCEPTION),
@@ -9609,7 +9445,6 @@
TEST_f_b (isfinite, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isfinite)
};
static void
@@ -9617,12 +9452,20 @@
{
START (isfinite);
RUN_TEST_LOOP_f_b_tg (isfinite, isfinite_test_data, );
- END (isfinite);
+ END;
+}
+
+static void
+finite_test (void)
+{
+ START (finite);
+ /* finite uses the same test data as isfinite. */
+ RUN_TEST_LOOP_f_b (finite, isfinite_test_data, );
+ END;
}
static const struct test_ff_i_data isgreater_test_data[] =
{
- START_DATA (isgreater),
TEST_ff_i (isgreater, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
@@ -9639,7 +9482,6 @@
TEST_ff_i (isgreater, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isgreater)
};
static void
@@ -9647,12 +9489,11 @@
{
START (isgreater);
RUN_TEST_LOOP_ff_i_tg (isgreater, isgreater_test_data, );
- END (isgreater);
+ END;
}
static const struct test_ff_i_data isgreaterequal_test_data[] =
{
- START_DATA (isgreaterequal),
TEST_ff_i (isgreaterequal, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
@@ -9669,7 +9510,6 @@
TEST_ff_i (isgreaterequal, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isgreaterequal)
};
static void
@@ -9677,12 +9517,11 @@
{
START (isgreaterequal);
RUN_TEST_LOOP_ff_i_tg (isgreaterequal, isgreaterequal_test_data, );
- END (isgreaterequal);
+ END;
}
static const struct test_f_i_data isinf_test_data[] =
{
- START_DATA (isinf),
TEST_f_b (isinf, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, 10, 0, NO_INEXACT_EXCEPTION),
@@ -9690,7 +9529,6 @@
TEST_f_b (isinf, plus_infty, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, minus_infty, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isinf)
};
static void
@@ -9698,12 +9536,11 @@
{
START (isinf);
RUN_TEST_LOOP_f_b_tg (isinf, isinf_test_data, );
- END (isinf);
+ END;
}
static const struct test_ff_i_data isless_test_data[] =
{
- START_DATA (isless),
TEST_ff_i (isless, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
@@ -9720,7 +9557,6 @@
TEST_ff_i (isless, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isless)
};
static void
@@ -9728,12 +9564,11 @@
{
START (isless);
RUN_TEST_LOOP_ff_i_tg (isless, isless_test_data, );
- END (isless);
+ END;
}
static const struct test_ff_i_data islessequal_test_data[] =
{
- START_DATA (islessequal),
TEST_ff_i (islessequal, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
@@ -9750,7 +9585,6 @@
TEST_ff_i (islessequal, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (islessequal)
};
static void
@@ -9758,12 +9592,11 @@
{
START (islessequal);
RUN_TEST_LOOP_ff_i_tg (islessequal, islessequal_test_data, );
- END (islessequal);
+ END;
}
static const struct test_ff_i_data islessgreater_test_data[] =
{
- START_DATA (islessgreater),
TEST_ff_i (islessgreater, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
@@ -9780,7 +9613,6 @@
TEST_ff_i (islessgreater, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (islessgreater)
};
static void
@@ -9788,12 +9620,11 @@
{
START (islessgreater);
RUN_TEST_LOOP_ff_i_tg (islessgreater, islessgreater_test_data, );
- END (islessgreater);
+ END;
}
static const struct test_f_i_data isnan_test_data[] =
{
- START_DATA (isnan),
TEST_f_b (isnan, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, 10, 0, NO_INEXACT_EXCEPTION),
@@ -9801,7 +9632,6 @@
TEST_f_b (isnan, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, qnan_value, 1, NO_INEXACT_EXCEPTION),
- END_DATA (isnan)
};
static void
@@ -9809,12 +9639,11 @@
{
START (isnan);
RUN_TEST_LOOP_f_b_tg (isnan, isnan_test_data, );
- END (isnan);
+ END;
}
static const struct test_f_i_data isnormal_test_data[] =
{
- START_DATA (isnormal),
TEST_f_b (isnormal, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, 10, 1, NO_INEXACT_EXCEPTION),
@@ -9822,7 +9651,6 @@
TEST_f_b (isnormal, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isnormal)
};
static void
@@ -9830,12 +9658,11 @@
{
START (isnormal);
RUN_TEST_LOOP_f_b_tg (isnormal, isnormal_test_data, );
- END (isnormal);
+ END;
}
static const struct test_f_i_data issignaling_test_data[] =
{
- START_DATA (issignaling),
TEST_f_b (issignaling, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, 10, 0, NO_INEXACT_EXCEPTION),
@@ -9843,7 +9670,6 @@
TEST_f_b (issignaling, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (issignaling)
};
static void
@@ -9851,12 +9677,11 @@
{
START (issignaling);
RUN_TEST_LOOP_f_b_tg (issignaling, issignaling_test_data, );
- END (issignaling);
+ END;
}
static const struct test_ff_i_data isunordered_test_data[] =
{
- START_DATA (isunordered),
TEST_ff_i (isunordered, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
@@ -9873,7 +9698,6 @@
TEST_ff_i (isunordered, qnan_value, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, qnan_value, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION),
- END_DATA (isunordered)
};
static void
@@ -9881,12 +9705,11 @@
{
START (isunordered);
RUN_TEST_LOOP_ff_i_tg (isunordered, isunordered_test_data, );
- END (isunordered);
+ END;
}
static const struct test_f_f_data j0_test_data[] =
{
- START_DATA (j0),
/* j0 is the Bessel function of the first kind of order 0 */
TEST_f_f (j0, qnan_value, qnan_value),
TEST_f_f (j0, plus_infty, 0),
@@ -9913,7 +9736,6 @@
TEST_f_f (j0, 0x1p16382L, -1.2193782500509000574176799046642541129387e-2466L),
TEST_f_f (j0, 0x1p16383L, 9.5859502826270374691362975419147645151233e-2467L),
#endif
- END_DATA (j0)
};
static void
@@ -9921,13 +9743,12 @@
{
START (j0);
RUN_TEST_LOOP_f_f (j0, j0_test_data, );
- END (j0);
+ END;
}
static const struct test_f_f_data j1_test_data[] =
{
- START_DATA (j1),
/* j1 is the Bessel function of the first kind of order 1 */
TEST_f_f (j1, qnan_value, qnan_value),
TEST_f_f (j1, plus_infty, 0),
@@ -9953,7 +9774,6 @@
TEST_f_f (j1, 0x1p16382L, 8.0839224448726336195866026476176740513439e-2467L),
TEST_f_f (j1, 0x1p16383L, -3.8895531955766020648617743624167352352217e-2467L),
#endif
- END_DATA (j1)
};
static void
@@ -9961,12 +9781,11 @@
{
START (j1);
RUN_TEST_LOOP_f_f (j1, j1_test_data, );
- END (j1);
+ END;
}
static const struct test_if_f_data jn_test_data[] =
{
- START_DATA (jn),
/* jn is the Bessel function of the first kind of order n. */
/* jn (0, x) == j0 (x) */
TEST_if_f (jn, 0, qnan_value, qnan_value),
@@ -10032,7 +9851,6 @@
/* Bug 14155: spurious exception may occur. */
TEST_if_f (jn, 2, 0x1.ffff62p+99L, -4.43860668048170034334926693188979974489e-16L, UNDERFLOW_EXCEPTION_OK),
- END_DATA (jn)
};
static void
@@ -10040,13 +9858,12 @@
{
START (jn);
RUN_TEST_LOOP_if_f (jn, jn_test_data, );
- END (jn);
+ END;
}
static const struct test_fi_f_data ldexp_test_data[] =
{
- START_DATA (ldexp),
TEST_fi_f (ldexp, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_fi_f (ldexp, minus_zero, 0, minus_zero, NO_INEXACT_EXCEPTION),
@@ -10059,7 +9876,6 @@
/* ldexp (x, 0) == x. */
TEST_fi_f (ldexp, 1.0L, 0L, 1.0L, NO_INEXACT_EXCEPTION),
- END_DATA (ldexp)
};
static void
@@ -10067,13 +9883,12 @@
{
START (ldexp);
RUN_TEST_LOOP_fi_f (ldexp, ldexp_test_data, );
- END (ldexp);
+ END;
}
static const struct test_f_f1_data lgamma_test_data[] =
{
- START_DATA (lgamma),
TEST_f_f1 (lgamma, plus_infty, plus_infty, 1),
TEST_f_f1 (lgamma, 0, plus_infty, 1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f1 (lgamma, minus_zero, plus_infty, -1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
@@ -10093,7 +9908,6 @@
TEST_f_f1 (lgamma, -0.5, M_LOG_2_SQRT_PIl, -1),
TEST_f_f1 (lgamma, 0.7L, 0.260867246531666514385732417016759578L, 1),
TEST_f_f1 (lgamma, 1.2L, -0.853740900033158497197028392998854470e-1L, 1),
- END_DATA (lgamma)
};
static void
@@ -10101,13 +9915,21 @@
{
START (lgamma);
RUN_TEST_LOOP_f_f1 (lgamma, lgamma_test_data, , signgam);
- END (lgamma);
+ END;
+}
+
+static void
+gamma_test (void)
+{
+ START (gamma);
+ /* gamma uses the same test data as lgamma. */
+ RUN_TEST_LOOP_f_f1 (gamma, lgamma_test_data, , signgam);
+ END;
}
static const struct test_f_l_data lrint_test_data[] =
{
- START_DATA (lrint),
/* XXX this test is incomplete. We need to have a way to specifiy
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
@@ -10130,7 +9952,6 @@
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint)
};
static void
@@ -10138,13 +9959,12 @@
{
START (lrint);
RUN_TEST_LOOP_f_l (lrint, lrint_test_data, );
- END (lrint);
+ END;
}
static const struct test_f_l_data lrint_tonearest_test_data[] =
{
- START_DATA (lrint_tonearest),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10167,7 +9987,6 @@
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_tonearest)
};
static void
@@ -10175,13 +9994,12 @@
{
START (lrint_tonearest);
RUN_TEST_LOOP_f_l (lrint, lrint_tonearest_test_data, FE_TONEAREST);
- END (lrint_tonearest);
+ END;
}
static const struct test_f_l_data lrint_towardzero_test_data[] =
{
- START_DATA (lrint_towardzero),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10204,7 +10022,6 @@
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_towardzero)
};
static void
@@ -10212,13 +10029,12 @@
{
START (lrint_towardzero);
RUN_TEST_LOOP_f_l (lrint, lrint_towardzero_test_data, FE_TOWARDZERO);
- END (lrint_towardzero);
+ END;
}
static const struct test_f_l_data lrint_downward_test_data[] =
{
- START_DATA (lrint_downward),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10241,7 +10057,6 @@
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_downward)
};
static void
@@ -10249,13 +10064,12 @@
{
START (lrint_downward);
RUN_TEST_LOOP_f_l (lrint, lrint_downward_test_data, FE_DOWNWARD);
- END (lrint_downward);
+ END;
}
static const struct test_f_l_data lrint_upward_test_data[] =
{
- START_DATA (lrint_upward),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 1, INEXACT_EXCEPTION),
@@ -10278,7 +10092,6 @@
TEST_f_l (lrint, 281474976710656.025L, 281474976710657, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_upward)
};
static void
@@ -10286,13 +10099,12 @@
{
START (lrint_upward);
RUN_TEST_LOOP_f_l (lrint, lrint_upward_test_data, FE_UPWARD);
- END (lrint_upward);
+ END;
}
static const struct test_f_L_data llrint_test_data[] =
{
- START_DATA (llrint),
/* XXX this test is incomplete. We need to have a way to specifiy
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
@@ -10420,7 +10232,6 @@
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint)
};
static void
@@ -10428,12 +10239,11 @@
{
START (llrint);
RUN_TEST_LOOP_f_L (llrint, llrint_test_data, );
- END (llrint);
+ END;
}
static const struct test_f_L_data llrint_tonearest_test_data[] =
{
- START_DATA (llrint_tonearest),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10557,7 +10367,6 @@
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_tonearest)
};
static void
@@ -10565,12 +10374,11 @@
{
START (llrint_tonearest);
RUN_TEST_LOOP_f_L (llrint, llrint_tonearest_test_data, FE_TONEAREST);
- END (llrint_tonearest);
+ END;
}
static const struct test_f_L_data llrint_towardzero_test_data[] =
{
- START_DATA (llrint_towardzero),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10694,7 +10502,6 @@
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_towardzero)
};
static void
@@ -10702,12 +10509,11 @@
{
START (llrint_towardzero);
RUN_TEST_LOOP_f_L (llrint, llrint_towardzero_test_data, FE_TOWARDZERO);
- END (llrint_towardzero);
+ END;
}
static const struct test_f_L_data llrint_downward_test_data[] =
{
- START_DATA (llrint_downward),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
@@ -10827,7 +10633,6 @@
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_downward)
};
static void
@@ -10835,12 +10640,11 @@
{
START (llrint_downward);
RUN_TEST_LOOP_f_L (llrint, llrint_downward_test_data, FE_DOWNWARD);
- END (llrint_downward);
+ END;
}
static const struct test_f_L_data llrint_upward_test_data[] =
{
- START_DATA (llrint_upward),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 1, INEXACT_EXCEPTION),
@@ -10958,7 +10762,6 @@
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_upward)
};
static void
@@ -10966,13 +10769,12 @@
{
START (llrint_upward);
RUN_TEST_LOOP_f_L (llrint, llrint_upward_test_data, FE_UPWARD);
- END (llrint_upward);
+ END;
}
static const struct test_f_f_data log_test_data[] =
{
- START_DATA (log),
TEST_f_f (log, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
@@ -10989,7 +10791,6 @@
TEST_f_f (log, 2, M_LN2l),
TEST_f_f (log, 10, M_LN10l),
TEST_f_f (log, 0.75L, -0.287682072451780927439219005993827432L),
- END_DATA (log)
};
static void
@@ -10997,13 +10798,12 @@
{
START (log);
RUN_TEST_LOOP_f_f (log, log_test_data, );
- END (log);
+ END;
}
static const struct test_f_f_data log10_test_data[] =
{
- START_DATA (log10),
TEST_f_f (log10, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log10, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
@@ -11023,7 +10823,6 @@
TEST_f_f (log10, 10000.0, 4),
TEST_f_f (log10, M_El, M_LOG10El),
TEST_f_f (log10, 0.75L, -0.124938736608299953132449886193870744L),
- END_DATA (log10)
};
static void
@@ -11031,13 +10830,12 @@
{
START (log10);
RUN_TEST_LOOP_f_f (log10, log10_test_data, );
- END (log10);
+ END;
}
static const struct test_f_f_data log1p_test_data[] =
{
- START_DATA (log1p),
TEST_f_f (log1p, 0, 0),
TEST_f_f (log1p, minus_zero, minus_zero),
@@ -11053,7 +10851,6 @@
TEST_f_f (log1p, -0.25L, -0.287682072451780927439219005993827432L),
TEST_f_f (log1p, -0.875, -2.07944154167983592825169636437452970L),
- END_DATA (log1p)
};
static void
@@ -11061,13 +10858,12 @@
{
START (log1p);
RUN_TEST_LOOP_f_f (log1p, log1p_test_data, );
- END (log1p);
+ END;
}
static const struct test_f_f_data log2_test_data[] =
{
- START_DATA (log2),
TEST_f_f (log2, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log2, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
@@ -11085,7 +10881,6 @@
TEST_f_f (log2, 16.0, 4),
TEST_f_f (log2, 256.0, 8),
TEST_f_f (log2, 0.75L, -.415037499278843818546261056052183492L),
- END_DATA (log2)
};
static void
@@ -11093,13 +10888,12 @@
{
START (log2);
RUN_TEST_LOOP_f_f (log2, log2_test_data, );
- END (log2);
+ END;
}
static const struct test_f_f_data logb_test_data[] =
{
- START_DATA (logb),
TEST_f_f (logb, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (logb, minus_infty, plus_infty, NO_INEXACT_EXCEPTION),
@@ -11128,7 +10922,6 @@
TEST_f_f (logb, 0x1p-16400L, -16400, NO_INEXACT_EXCEPTION),
TEST_f_f (logb, 0x.00000000001p-16382L, -16426, NO_INEXACT_EXCEPTION),
#endif
- END_DATA (logb)
};
static void
@@ -11136,12 +10929,11 @@
{
START (logb);
RUN_TEST_LOOP_f_f (logb, logb_test_data, );
- END (logb);
+ END;
}
static const struct test_f_f_data logb_downward_test_data[] =
{
- START_DATA (logb_downward),
/* IEEE 754-2008 says (section 5.3.3) that "logB(1) is +0.". Libm
should not return -0 from logb in any rounding mode. PowerPC32 has
failed with this test for power4 logb (and logbl on all PowerPC
@@ -11152,7 +10944,6 @@
/* BZ #887 */
TEST_f_f (logb, 1.000e+0, plus_zero, NO_INEXACT_EXCEPTION),
- END_DATA (logb_downward)
};
static void
@@ -11160,12 +10951,11 @@
{
START (logb_downward);
RUN_TEST_LOOP_f_f (logb, logb_downward_test_data, FE_DOWNWARD);
- END (logb_downward);
+ END;
}
static const struct test_f_l_data lround_test_data[] =
{
- START_DATA (lround),
/* TODO: missing +/-Inf as well as qNaN tests. */
TEST_f_l (lround, 0, 0),
TEST_f_l (lround, minus_zero, 0),
@@ -11200,7 +10990,6 @@
TEST_f_l (lround, 0x1.fffffep+23, 16777215),
TEST_f_l (lround, -0x1.fffffep+23, -16777215),
#endif
- END_DATA (lround)
};
static void
@@ -11208,13 +10997,12 @@
{
START (lround);
RUN_TEST_LOOP_f_l (lround, lround_test_data, );
- END (lround);
+ END;
}
static const struct test_f_L_data llround_test_data[] =
{
[... 1545 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits