public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCHv3 00/11] Refactor libm-test.c and friends
@ 2016-05-26 21:42 Paul E. Murphy
  2016-05-26 21:43 ` [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c Paul E. Murphy
                   ` (10 more replies)
  0 siblings, 11 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:42 UTC (permalink / raw)
  To: libc-alpha

Patch 1 introduces several new type-generic macros used later on
to include tests based on format, not type.

Patch 2 is included per Joseph's request.  I've also done a
some extra manual fixup to simplify duplicate checks for
mantissa bits.

Patch 3-7 replace M_* macros with new macros prefixed with lit_.
A LITM macro is introduced to wrap math.h M_ constants.

Patch 8 introduces the a new test modifier 'j' for long double
parameters.  This explicitly appends the 'L' suffix to FP
literals.

Patch 9 removes the CHOOSE macro all togethor.  It uses some
macro tricks to select the appropriate ulps value for the
type being tested.

Patch 10-11 require regeneration of auto-libm-test-out.

The instructions for tests are similar to the previous
patch. Substitute 15 for 12, and 14 for 11 in the commands
given in the previous patchset [1].

[1] https://sourceware.org/ml/libc-alpha/2016-05/msg00481.html

Paul E. Murphy (11):
  Begin refactor of libm-test.inc
  Refactor type specific macros using regexes
  Refactor M_ macros defined in libm-test.inc
  Replace M_PI2l with lit_pi_2_d in libm-test.inc
  Replace M_PIl with lit_pi in libm-test.inc
  Replace M_PI_4l with lit_pi_4_d in libm-test.inc
  Replace M_El with lit_e in libm-test.inc
  Apply LIT(x) to floating point literals in libm-test.c
  Remove CHOOSE() macro from libm-tests.inc
  Remove type specific information from auto-libm-test-in
  Generate new format names in auto-libm-test-out

 math/auto-libm-test-in     |  115 ++--
 math/gen-auto-libm-tests.c |   24 +-
 math/gen-libm-test.pl      |  107 ++-
 math/libm-test.inc         | 1632 ++++++++++++++++++++++----------------------
 math/test-double-finite.c  |    1 -
 math/test-double-vlen2.h   |    1 -
 math/test-double-vlen4.h   |    1 -
 math/test-double-vlen8.h   |    1 -
 math/test-double.c         |    1 -
 math/test-double.h         |    6 +-
 math/test-float-finite.c   |    1 -
 math/test-float-vlen16.h   |    1 -
 math/test-float-vlen4.h    |    1 -
 math/test-float-vlen8.h    |    1 -
 math/test-float.c          |    1 -
 math/test-float.h          |    7 +-
 math/test-idouble.c        |    1 -
 math/test-ifloat.c         |    1 -
 math/test-ildoubl.c        |    1 -
 math/test-ldouble-finite.c |    1 -
 math/test-ldouble.c        |    1 -
 math/test-ldouble.h        |    6 +-
 22 files changed, 1000 insertions(+), 912 deletions(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 11/11] Generate new format names in auto-libm-test-out
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (3 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 07/11] Replace M_El with lit_e " Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-06-06 21:05   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 02/11] Refactor type specific macros using regexes Paul E. Murphy
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

This converts the inclusion macro for each test to use
the format specific macro. In addition, the format
specifier is removed as it is applied via the LIT() macro
which is itself applied when converting the auto inputs and
libm-test.inc into libm-test.c.

	* math/gen-auto-libm-test.c (fp_format_desc): remove
	suffix member.
	(output_generic_value): Remove usage of suffix member,
	and the resulting unuse of the fp_format argument.
	(output_for_one_input_case): Remove unused fp_format
	parameter.

	* math/auto-libm-test-out: Regenerate.

	* math/libm-test.inc (TEST_COND_ldbl_128ibm): replace
	usage with TEST_COND_ibm128.
	(TEST_COND_flt_32): Remove.
	(TEST_COND_dbl_64): Remove.
	(TEST_COND_ldbl_96_intel): Remove.
	(TEST_COND_ldbl_96_m68k): Remove.
	(TEST_COND_ldbl_128): Remove.
---
 math/gen-auto-libm-tests.c | 24 ++++++++++--------------
 math/libm-test.inc         | 14 +++-----------
 2 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
index 0a57382..0d10197 100644
--- a/math/gen-auto-libm-tests.c
+++ b/math/gen-auto-libm-tests.c
@@ -158,9 +158,6 @@ typedef struct
 {
   /* The name of the format.  */
   const char *name;
-  /* The suffix to use on floating-point constants with this
-     format.  */
-  const char *suffix;
   /* A string for the largest normal value, or NULL for IEEE formats
      where this can be determined automatically.  */
   const char *max_string;
@@ -186,12 +183,12 @@ typedef struct
    enumeration.  */
 static fp_format_desc fp_formats[fp_num_formats] =
   {
-    { "flt-32", "f", NULL, 24, 128, -125, {}, {}, {}, {}, {} },
-    { "dbl-64", "", NULL, 53, 1024, -1021, {}, {}, {}, {}, {} },
-    { "ldbl-96-intel", "L", NULL, 64, 16384, -16381, {}, {}, {}, {}, {} },
-    { "ldbl-96-m68k", "L", NULL, 64, 16384, -16382, {}, {}, {}, {}, {} },
-    { "ldbl-128", "L", NULL, 113, 16384, -16381, {}, {}, {}, {}, {} },
-    { "ldbl-128ibm", "L", "0x1.fffffffffffff7ffffffffffff8p+1023",
+    { "binary32", NULL, 24, 128, -125, {}, {}, {}, {}, {} },
+    { "binary64", NULL, 53, 1024, -1021, {}, {}, {}, {}, {} },
+    { "intel96", NULL, 64, 16384, -16381, {}, {}, {}, {}, {} },
+    { "m68k96", NULL, 64, 16384, -16382, {}, {}, {}, {}, {} },
+    { "binary128", NULL, 113, 16384, -16381, {}, {}, {}, {}, {} },
+    { "ibm128", "0x1.fffffffffffff7ffffffffffff8p+1023",
       106, 1024, -968, {}, {}, {}, {}, {} },
   };
 
@@ -1648,8 +1645,7 @@ int_fits_type (mpz_t z, arg_ret_type type, int long_bits)
 
 static void
 output_generic_value (FILE *fp, const char *filename, const generic_value *v,
-		      bool ignore, arg_ret_type type, fp_format format,
-		      int long_bits)
+		      bool ignore, arg_ret_type type, int long_bits)
 {
   if (ignore)
     {
@@ -1662,7 +1658,7 @@ output_generic_value (FILE *fp, const char *filename, const generic_value *v,
   switch (type)
     {
     case type_fp:
-      suffix = fp_formats[format].suffix;
+      suffix = "";
       break;
 
     case type_int:
@@ -1906,7 +1902,7 @@ output_for_one_input_case (FILE *fp, const char *filename, test_function *tf,
 	      /* Print inputs.  */
 	      for (size_t i = 0; i < tf->num_args; i++)
 		output_generic_value (fp, filename, &inputs[i], false,
-				      tf->arg_types[i], f, long_bits);
+				      tf->arg_types[i], long_bits);
 	      if (fputs (" :", fp) < 0)
 		error (EXIT_FAILURE, errno, "write to '%s'", filename);
 	      /* Print outputs.  */
@@ -1942,7 +1938,7 @@ output_for_one_input_case (FILE *fp, const char *filename, test_function *tf,
 		      abort ();
 		    }
 		  output_generic_value (fp, filename, &g, ignore_output[i],
-					tf->ret_types[i], f, long_bits);
+					tf->ret_types[i], long_bits);
 		  generic_value_free (&g);
 		}
 	      if (fputs (" :", fp) < 0)
diff --git a/math/libm-test.inc b/math/libm-test.inc
index cb10fa0..110bb77 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -268,14 +268,6 @@
 # define NO_TEST_INLINE_DOUBLE	0
 #endif
 
-/* Conditions used by tests generated by gen-auto-libm-tests.c.  */
-#define TEST_COND_flt_32 TEST_COND_binary32
-#define TEST_COND_dbl_64 TEST_COND_binary64
-#define TEST_COND_ldbl_96_intel TEST_COND_intel96
-#define TEST_COND_ldbl_96_m68k  TEST_COND_m68k96
-#define TEST_COND_ldbl_128 TEST_COND_binary128
-#define TEST_COND_ldbl_128ibm TEST_COND_ibm128
-
 #if LONG_MAX == 0x7fffffff
 # define TEST_COND_long32	1
 # define TEST_COND_long64	0
@@ -405,7 +397,7 @@ init_max_error (const char *name, int exact)
   prev_imag_max_error = find_ulps (name, func_imag_ulps,
 				   (sizeof (func_imag_ulps)
 				    / sizeof (func_imag_ulps[0])));
-#if TEST_COND_ldbl_128ibm
+#if TEST_COND_ibm128
   /* The documented accuracy of IBM long double division is 3ulp (see
      libgcc/config/rs6000/ibm-ldouble-format), so do not require
      better accuracy for libm functions that are exactly defined for
@@ -704,14 +696,14 @@ test_exceptions (const char *test_name, int exception)
 	 arithmetic.  */
 #ifdef FE_UNDERFLOW
       if ((exception & UNDERFLOW_EXCEPTION_OK) == 0
-	  && !(TEST_COND_ldbl_128ibm
+	  && !(TEST_COND_ibm128
 	       && (exception & UNDERFLOW_EXCEPTION) == 0))
 	test_single_exception (test_name, exception, UNDERFLOW_EXCEPTION,
 			       FE_UNDERFLOW, "Underflow");
 #endif
 #ifdef FE_INEXACT
       if ((exception & (INEXACT_EXCEPTION | NO_INEXACT_EXCEPTION)) != 0
-	  && !(TEST_COND_ldbl_128ibm
+	  && !(TEST_COND_ibm128
 	       && (exception & NO_INEXACT_EXCEPTION) != 0))
 	test_single_exception (test_name, exception, INEXACT_EXCEPTION,
 			       FE_INEXACT, "Inexact");
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (6 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-27  8:43   ` Joseph Myers
  2016-05-26 21:53 ` [PATCHv3 05/11] Replace M_PIl with lit_pi " Paul E. Murphy
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

These are local to the test suite.  Rename them as a macro starting
with lit_pi and a series of postfix operations to give us a constant
starting with lit_pi.

The lit prefix is intended to enable easy substitutions via
gen-test-libm.pl if needed.

	* libm-test.inc (M_PI_6l) Rename to
	(lit_pi_6_d): New Macro.
	(M_PI_34l): Rename to
	(lit_pi_3_m_4_d): New Macro.
	(M_PI_34_LOG10El): Rename to
	(lit_pi_3_ln10_m_4_d): New Macro.
	(M_PI2_LOG10El): Rename to
	(lit_pi_2_ln10_m_d):  New Macro.
	(M_PI4_LOG10El): Rename to
	(lit_pi_4_ln10_m_d):  New Macro.
	(M_PI_LOG10El): Rename to
	(lit_pi_ln10_d):  New Macro.
---
 math/libm-test.inc | 77 ++++++++++++++++++++++++++++++------------------------
 1 file changed, 43 insertions(+), 34 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index b0028c6..4cd1db6 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -305,13 +305,22 @@ struct ulp_data
 # define TEST_COND_x86		0
 #endif
 
-/* Various constants (we must supply them precalculated for accuracy).  */
-#define M_PI_6l			.52359877559829887307710723054658383L
-#define M_PI_34l		2.356194490192344928846982537459627163L	/* 3*pi/4 */
-#define M_PI_34_LOG10El		1.023282265381381010614337719073516828L
-#define M_PI2_LOG10El		0.682188176920920673742891812715677885L
-#define M_PI4_LOG10El		0.341094088460460336871445906357838943L
-#define M_PI_LOG10El		1.364376353841841347485783625431355770L
+/* Various constants of pi (we must supply them precalculated for accuracy).
+   They are written as a series of postfix operations to try to keep them
+   concise yet somewhat readable.  */
+
+/* pi / 6 */
+#define lit_pi_6_d		LIT (.52359877559829887307710723054658383)
+/* (pi * 3) / 4 */
+#define lit_pi_3_m_4_d		LIT (2.356194490192344928846982537459627163)
+/* (pi * 3 * ln(10) / 4 */
+#define lit_pi_3_m_ln10_m_4_d	LIT (1.023282265381381010614337719073516828)
+/* pi / (2 * ln(10)) */
+#define lit_pi_2_ln10_m_d	LIT (0.682188176920920673742891812715677885)
+/* pi / (4 * ln(10)) */
+#define lit_pi_4_ln10_m_d	LIT (0.341094088460460336871445906357838943)
+/* pi / ln(10) */
+#define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
 
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
@@ -1989,8 +1998,8 @@ static const struct test_ff_f_data atan2_test_data[] =
 
     TEST_ff_f (atan2, plus_infty, plus_infty, M_PI_4l, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, minus_infty, M_PI_34l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, minus_infty, lit_pi_3_m_4_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, minus_infty, -lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (atan2, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -2082,8 +2091,8 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, minus_zero, minus_zero, M_PI_2l, 0.0),
     TEST_c_c (cacos, 0, minus_zero, M_PI_2l, 0.0),
 
-    TEST_c_c (cacos, minus_infty, plus_infty, M_PI_34l, minus_infty),
-    TEST_c_c (cacos, minus_infty, minus_infty, M_PI_34l, plus_infty),
+    TEST_c_c (cacos, minus_infty, plus_infty, lit_pi_3_m_4_d, minus_infty),
+    TEST_c_c (cacos, minus_infty, minus_infty, lit_pi_3_m_4_d, plus_infty),
 
     TEST_c_c (cacos, plus_infty, plus_infty, M_PI_4l, minus_infty),
     TEST_c_c (cacos, plus_infty, minus_infty, M_PI_4l, plus_infty),
@@ -2769,8 +2778,8 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, minus_zero, 0, 0.0, M_PI_2l),
     TEST_c_c (cacosh, 0, minus_zero, 0.0, -M_PI_2l),
     TEST_c_c (cacosh, minus_zero, minus_zero, 0.0, -M_PI_2l),
-    TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, M_PI_34l),
-    TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -M_PI_34l),
+    TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
+    TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
@@ -3472,9 +3481,9 @@ static const struct test_c_f_data carg_test_data[] =
 
     TEST_c_f (carg, plus_infty, minus_infty, -M_PI_4l),
 
-    TEST_c_f (carg, minus_infty, plus_infty, M_PI_34l),
+    TEST_c_f (carg, minus_infty, plus_infty, lit_pi_3_m_4_d),
 
-    TEST_c_f (carg, minus_infty, minus_infty, -M_PI_34l),
+    TEST_c_f (carg, minus_infty, minus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_f (carg, qnan_value, qnan_value, qnan_value),
 
@@ -6236,8 +6245,8 @@ static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, 0, 0, minus_infty, 0.0, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (clog, 0, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
 
-    TEST_c_c (clog, minus_infty, plus_infty, plus_infty, M_PI_34l),
-    TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -M_PI_34l),
+    TEST_c_c (clog, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
+    TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_c (clog, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -M_PI_4l),
@@ -6291,30 +6300,30 @@ clog_test (void)
 
 static const struct test_c_c_data clog10_test_data[] =
   {
-    TEST_c_c (clog10, minus_zero, 0, minus_infty, M_PI_LOG10El, DIVIDE_BY_ZERO_EXCEPTION),
-    TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -M_PI_LOG10El, DIVIDE_BY_ZERO_EXCEPTION),
+    TEST_c_c (clog10, minus_zero, 0, minus_infty, lit_pi_ln10_d, DIVIDE_BY_ZERO_EXCEPTION),
+    TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -lit_pi_ln10_d, DIVIDE_BY_ZERO_EXCEPTION),
 
     TEST_c_c (clog10, 0, 0, minus_infty, 0.0, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (clog10, 0, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
 
-    TEST_c_c (clog10, minus_infty, plus_infty, plus_infty, M_PI_34_LOG10El),
+    TEST_c_c (clog10, minus_infty, plus_infty, plus_infty, lit_pi_3_m_ln10_m_4_d),
 
-    TEST_c_c (clog10, plus_infty, plus_infty, plus_infty, M_PI4_LOG10El),
-    TEST_c_c (clog10, plus_infty, minus_infty, plus_infty, -M_PI4_LOG10El),
+    TEST_c_c (clog10, plus_infty, plus_infty, plus_infty, lit_pi_4_ln10_m_d),
+    TEST_c_c (clog10, plus_infty, minus_infty, plus_infty, -lit_pi_4_ln10_m_d),
 
-    TEST_c_c (clog10, 0, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, 3, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, minus_zero, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, -3, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, 0, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, 3, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, minus_zero, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, -3, minus_infty, plus_infty, -M_PI2_LOG10El),
+    TEST_c_c (clog10, 0, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 3, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, minus_zero, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, -3, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 0, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 3, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, minus_zero, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, -3, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
 
-    TEST_c_c (clog10, minus_infty, 0, plus_infty, M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, 1, plus_infty, M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, minus_zero, plus_infty, -M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, -1, plus_infty, -M_PI_LOG10El),
+    TEST_c_c (clog10, minus_infty, 0, plus_infty, lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, 1, plus_infty, lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, minus_zero, plus_infty, -lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, -1, plus_infty, -lit_pi_ln10_d),
 
     TEST_c_c (clog10, plus_infty, 0, plus_infty, 0.0),
     TEST_c_c (clog10, plus_infty, 1, plus_infty, 0.0),
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 02/11] Refactor type specific macros using regexes
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (4 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 11/11] Generate new format names in auto-libm-test-out Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-26 22:59   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc Paul E. Murphy
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

Replace most of the type specific macros  with the equivalent
type-generic macro using the following sed replacement command below:

sed -ri -e 's/defined TEST_FLOAT/TEST_COND_binary32/' \
        -e 's/ndef TEST_FLOAT/ !TEST_COND_binary32/'  \
        -e 's/def TEST_FLOAT/ TEST_COND_binary32/'    \
        -e 's/defined TEST_DOUBLE/TEST_COND_binary64/'\
        -e 's/ndef TEST_DOUBLE/ !TEST_COND_binary64/' \
        -e 's/def TEST_DOUBLE/ TEST_COND_binary64/'   \
        -e 's/defined TEST_LDOUBLE && //'             \
        -e 's/ifdef TEST_LDOUBLE/if MANT_DIG >= 64/'  \
        -e 's/defined TEST_LDOUBLE/MANT_DIG >= 64/'   \
        -e '/nexttoward_test_data\[\]/,/  };/!s/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/\1/g' \
        libm-test.inc

With a little extra manual cleanup to simplify the following case:

#if MANT_DIG >= 64
# if MANT_DIG >= 64
...
# endif
...

Note, TEST_LDOUBLE checks are replaced by MANT_DIG >= 64 excepting
where another property of the type is being tested. And, the final
regex is intended to avoid replacing LDBL_ macro usage within the
nexttoward tests which explicitly take argument 2 as long double.

	* math/libm-test.inc:
	(TEST_FLOAT): Change usage to TEST_COND_binary32.
	(TEST_DOUBLE): Change usage to TEST_COND_binary64.
	(TEST_LDOUBLE): Update usage to evaluate as true if
	the guarded tests match the property being tested.
	(LDBL_MAX_EXP): Change to MAX_EXP.
	(LDBL_MIN_EXP): Change to MIN_EXP.
	(LDBL_MANT_DIG): Change to MANT_DIG, except for
	nexttoward tests.
---
 math/libm-test.inc | 674 ++++++++++++++++++++++++++---------------------------
 1 file changed, 331 insertions(+), 343 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index afabe05..b0028c6 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -264,12 +264,12 @@ struct ulp_data
 						 : UNDERFLOW_EXCEPTION)
 
 /* Inline tests disabled for particular types.  */
-#ifdef TEST_FLOAT
+#if TEST_COND_binary32
 # define NO_TEST_INLINE_FLOAT	NO_TEST_INLINE
 #else
 # define NO_TEST_INLINE_FLOAT	0
 #endif
-#ifdef TEST_DOUBLE
+#if TEST_COND_binary64
 # define NO_TEST_INLINE_DOUBLE	NO_TEST_INLINE
 #else
 # define NO_TEST_INLINE_DOUBLE	0
@@ -2156,7 +2156,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -1.0L, 0x1p50L, 1.570796326794897507409741391764983781004L, -3.535050620855721078027883819436759661753e1L),
     TEST_c_c (cacos, 1.0L, -0x1p50L, 1.570796326794895731052901991514519103193L, 3.535050620855721078027883819436759661753e1L),
     TEST_c_c (cacos, -1.0L, -0x1p50L, 1.570796326794897507409741391764983781004L, 3.535050620855721078027883819436759661753e1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1p500L, 1.0L, 3.054936363499604682051979393213617699789e-151L, -3.472667374605326000180332928505464606058e2L),
     TEST_c_c (cacos, 0x1p500L, -1.0L, 3.054936363499604682051979393213617699789e-151L, 3.472667374605326000180332928505464606058e2L),
     TEST_c_c (cacos, -0x1p500L, 1.0L, 3.141592653589793238462643383279502884197L, -3.472667374605326000180332928505464606058e2L),
@@ -2166,7 +2166,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 1.0L, -0x1p500L, 1.570796326794896619231321691639751442099L, 3.472667374605326000180332928505464606058e2L),
     TEST_c_c (cacos, -1.0L, -0x1p500L, 1.570796326794896619231321691639751442099L, 3.472667374605326000180332928505464606058e2L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (cacos, 0x1p5000L, 1.0L, 7.079811261048172892385615158694057552948e-1506L, -3.466429049980286492395577839412341016946e3L),
     TEST_c_c (cacos, 0x1p5000L, -1.0L, 7.079811261048172892385615158694057552948e-1506L, 3.466429049980286492395577839412341016946e3L),
     TEST_c_c (cacos, -0x1p5000L, 1.0L, 3.141592653589793238462643383279502884197L, -3.466429049980286492395577839412341016946e3L),
@@ -2178,10 +2178,10 @@ static const struct test_c_c_data cacos_test_data[] =
 #endif
 
     TEST_c_c (cacos, 0x1.fp127L, 0x1.fp127L, 7.853981633974483096156608458198757210493e-1L, -8.973081118419833726837456344608533993585e1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp1023L, 0x1.fp1023L, 7.853981633974483096156608458198757210493e-1L, -7.107906849659093345062145442726115449315e2L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (cacos, 0x1.fp16383L, 0x1.fp16383L, 7.853981633974483096156608458198757210493e-1L, -1.135753137836666928715489992987020363057e4L),
 #endif
 
@@ -2193,7 +2193,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -1.5L, 0x1.fp-129L, 3.141592653589793238462643383279502884195L, -9.624236501192068949955178268487368462704e-1L),
     TEST_c_c (cacos, 1.5L, -0x1.fp-129L, 2.546345110742945032959687790021055102355e-39L, 9.624236501192068949955178268487368462704e-1L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacos, -1.5L, -0x1.fp-129L, 3.141592653589793238462643383279502884195L, 9.624236501192068949955178268487368462704e-1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1025L, 1.5L, 1.570796326794896619231321691639751442099L, -1.194763217287109304111930828519090523536L),
     TEST_c_c (cacos, 0x1.fp-1025L, -1.5L, 1.570796326794896619231321691639751442099L, 1.194763217287109304111930828519090523536L),
     TEST_c_c (cacos, -0x1.fp-1025L, 1.5L, 1.570796326794896619231321691639751442099L, -1.194763217287109304111930828519090523536L),
@@ -2203,7 +2203,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 1.5L, -0x1.fp-1025L, 4.819934639999230680322935210539402497827e-309L, 9.624236501192068949955178268487368462704e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacos, -1.5L, -0x1.fp-1025L, 3.141592653589793238462643383279502884197L, 9.624236501192068949955178268487368462704e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 1.5L, 1.570796326794896619231321691639751442099L, -1.194763217287109304111930828519090523536L),
     TEST_c_c (cacos, 0x1.fp-16385L, -1.5L, 1.570796326794896619231321691639751442099L, 1.194763217287109304111930828519090523536L),
     TEST_c_c (cacos, -0x1.fp-16385L, 1.5L, 1.570796326794896619231321691639751442099L, -1.194763217287109304111930828519090523536L),
@@ -2262,7 +2262,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -1.0L, 0x1.fp-129L, 3.141592653589793238409287030509680549213L, -5.335635276982233498398987585285818977933e-20L),
     TEST_c_c (cacos, 1.0L, -0x1.fp-129L, 5.335635276982233498398987585285818977930e-20L, 5.335635276982233498398987585285818977933e-20L),
     TEST_c_c (cacos, -1.0L, -0x1.fp-129L, 3.141592653589793238409287030509680549213L, 5.335635276982233498398987585285818977933e-20L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (cacos, 0x1.fp-1000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (cacos, -0x1.fp-1000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L),
@@ -2280,7 +2280,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 1.0L, -0x1.fp-1025L, 7.340879205566679497036857179189356754017e-155L, 7.340879205566679497036857179189356754017e-155L),
     TEST_c_c (cacos, -1.0L, -0x1.fp-1025L, 3.141592653589793238462643383279502884197L, 7.340879205566679497036857179189356754017e-155L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-10000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (cacos, 0x1.fp-10000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (cacos, -0x1.fp-10000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L),
@@ -2323,7 +2323,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x1.000002p0L, 0.0L, 3.141592653589793238462643383279502884197L, -4.882812451493617206486388134172712975070e-4L),
     TEST_c_c (cacos, 0x1.000002p0L, -0.0L, 0.0L, 4.882812451493617206486388134172712975070e-4L),
     TEST_c_c (cacos, -0x1.000002p0L, -0.0L, 3.141592653589793238462643383279502884197L, 4.882812451493617206486388134172712975070e-4L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1p-52L, 0x1.0000000000001p0L, 1.570796326794896462222075823262262934288L, -8.813735870195431822418551933572982483664e-1L),
     TEST_c_c (cacos, 0x1p-52L, -0x1.0000000000001p0L, 1.570796326794896462222075823262262934288L, 8.813735870195431822418551933572982483664e-1L),
     TEST_c_c (cacos, -0x1p-52L, 0x1.0000000000001p0L, 1.570796326794896776240567560017239949909L, -8.813735870195431822418551933572982483664e-1L),
@@ -2349,7 +2349,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1.0000000000001p0L, -0.0L, 0.0L, 2.107342425544701550354780375182800088393e-8L),
     TEST_c_c (cacos, -0x1.0000000000001p0L, -0.0L, 3.141592653589793238462643383279502884197L, 2.107342425544701550354780375182800088393e-8L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (cacos, 0x1p-63L, 0x1.0000000000000002p0L, 1.570796326794896619154657020805582738031L, -8.813735870195430253092739958139610131001e-1L),
     TEST_c_c (cacos, 0x1p-63L, -0x1.0000000000000002p0L, 1.570796326794896619154657020805582738031L, 8.813735870195430253092739958139610131001e-1L),
     TEST_c_c (cacos, -0x1p-63L, 0x1.0000000000000002p0L, 1.570796326794896619307986362473920146166L, -8.813735870195430253092739958139610131001e-1L),
@@ -2358,7 +2358,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x1.0000000000000002p0L, 0x1p-63L, 3.141592653377875508152537040020250564229L, -5.116146586219826555037807251857670783420e-10L),
     TEST_c_c (cacos, 0x1.0000000000000002p0L, -0x1p-63L, 2.119177303101063432592523199680782317447e-10L, 5.116146586219826555037807251857670783420e-10L),
     TEST_c_c (cacos, -0x1.0000000000000002p0L, -0x1p-63L, 3.141592653377875508152537040020250564229L, 5.116146586219826555037807251857670783420e-10L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L),
     TEST_c_c (cacos, 0x1.fp-16385L, -0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430253092739958139610130980e-1L),
     TEST_c_c (cacos, -0x1.fp-16385L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L),
@@ -2377,7 +2377,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1.0000000000000002p0L, -0.0L, 0.0L, 4.656612873077392578082927418388212703712e-10L),
     TEST_c_c (cacos, -0x1.0000000000000002p0L, -0.0L, 3.141592653589793238462643383279502884197L, 4.656612873077392578082927418388212703712e-10L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (cacos, 0x1p-106L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639742726335L, -8.813735870195430252326093249798097405561e-1L),
     TEST_c_c (cacos, 0x1p-106L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639742726335L, 8.813735870195430252326093249798097405561e-1L),
     TEST_c_c (cacos, -0x1p-106L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639760157863L, -8.813735870195430252326093249798097405561e-1L),
@@ -2403,7 +2403,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, -0.0L, 0.0L, 2.220446049250313080847263336181636063482e-16L),
     TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, -0.0L, 3.141592653589793238462643383279502884197L, 2.220446049250313080847263336181636063482e-16L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (cacos, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751374007L, -8.813735870195430252326093249797924452120e-1L),
     TEST_c_c (cacos, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751374007L, 8.813735870195430252326093249797924452120e-1L),
     TEST_c_c (cacos, -0x1p-113L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751510190L, -8.813735870195430252326093249797924452120e-1L),
@@ -2494,7 +2494,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1.fp-129L, -0x1.fp-129L, 1.570796326794896619231321691639751442096L, 2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacos, -0x1.fp-129L, 0x1.fp-129L, 1.570796326794896619231321691639751442101L, -2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacos, -0x1.fp-129L, -0x1.fp-129L, 1.570796326794896619231321691639751442101L, 2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1p-52L, 0x0.fffffffffffff8p0L, 1.570796326794896462222075823262236786996L, -8.813735870195429467279863907910458761820e-1L),
     TEST_c_c (cacos, 0x1p-52L, -0x0.fffffffffffff8p0L, 1.570796326794896462222075823262236786996L, 8.813735870195429467279863907910458761820e-1L),
     TEST_c_c (cacos, -0x1p-52L, 0x0.fffffffffffff8p0L, 1.570796326794896776240567560017266097201L, -8.813735870195429467279863907910458761820e-1L),
@@ -2528,7 +2528,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0.5L, 0x1p-52L, 2.094395102393195492308428922186316279087L, -2.563950248511418570403591756798643804971e-16L),
     TEST_c_c (cacos, 0.5L, -0x1p-52L, 1.047197551196597746154214461093186605110L, 2.563950248511418570403591756798643804971e-16L),
     TEST_c_c (cacos, -0.5L, -0x1p-52L, 2.094395102393195492308428922186316279087L, 2.563950248511418570403591756798643804971e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1025L, 0.5L, 1.570796326794896619231321691639751442099L, -4.812118250596034474977589134243684231352e-1L),
     TEST_c_c (cacos, 0x1.fp-1025L, -0.5L, 1.570796326794896619231321691639751442099L, 4.812118250596034474977589134243684231352e-1L),
     TEST_c_c (cacos, -0x1.fp-1025L, 0.5L, 1.570796326794896619231321691639751442099L, -4.812118250596034474977589134243684231352e-1L),
@@ -2542,7 +2542,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1p-52L, -0x1p-52L, 1.570796326794896397186716766608443357372L, 2.220446049250313080847263336181677117148e-16L),
     TEST_c_c (cacos, -0x1p-52L, 0x1p-52L, 1.570796326794896841275926616671059526825L, -2.220446049250313080847263336181677117148e-16L),
     TEST_c_c (cacos, -0x1p-52L, -0x1p-52L, 1.570796326794896841275926616671059526825L, 2.220446049250313080847263336181677117148e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1025L, 0x1p-52L, 1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181622378926e-16L),
     TEST_c_c (cacos, 0x1.fp-1025L, -0x1p-52L, 1.570796326794896619231321691639751442099L, 2.220446049250313080847263336181622378926e-16L),
     TEST_c_c (cacos, -0x1.fp-1025L, 0x1p-52L, 1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181622378926e-16L),
@@ -2560,13 +2560,13 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x1p-52L, 0.0L, 1.570796326794896841275926616671059526825L, -0.0L),
     TEST_c_c (cacos, 0x1p-52L, -0.0L, 1.570796326794896397186716766608443357372L, 0.0L),
     TEST_c_c (cacos, -0x1p-52L, -0.0L, 1.570796326794896841275926616671059526825L, 0.0L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1025L, 0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacos, 0x1.fp-1025L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacos, -0x1.fp-1025L, 0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacos, -0x1.fp-1025L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (cacos, 0x1p-63L, 0x0.ffffffffffffffffp0L, 1.570796326794896619154657020805582738025L, -8.813735870195430251942769895627079569937e-1L),
     TEST_c_c (cacos, 0x1p-63L, -0x0.ffffffffffffffffp0L, 1.570796326794896619154657020805582738025L, 8.813735870195430251942769895627079569937e-1L),
     TEST_c_c (cacos, -0x1p-63L, 0x0.ffffffffffffffffp0L, 1.570796326794896619307986362473920146173L, -8.813735870195430251942769895627079569937e-1L),
@@ -2575,7 +2575,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x0.ffffffffffffffffp0L, 0x1p-63L, 3.141592653170952461345846619605307690007L, -2.588578361325995866221775673638805081337e-10L),
     TEST_c_c (cacos, 0x0.ffffffffffffffffp0L, -0x1p-63L, 4.188407771167967636741951941902992986043e-10L, 2.588578361325995866221775673638805081337e-10L),
     TEST_c_c (cacos, -0x0.ffffffffffffffffp0L, -0x1p-63L, 3.141592653170952461345846619605307690007L, 2.588578361325995866221775673638805081337e-10L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 1.570796326794896619231321691639751442099L, -8.813735870195430251942769895627079569917e-1L),
     TEST_c_c (cacos, 0x1.fp-16385L, -0x0.ffffffffffffffffp0L, 1.570796326794896619231321691639751442099L, 8.813735870195430251942769895627079569917e-1L),
     TEST_c_c (cacos, -0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 1.570796326794896619231321691639751442099L, -8.813735870195430251942769895627079569917e-1L),
@@ -2602,7 +2602,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0.5L, 0x1p-63L, 2.094395102393195492308428922186335256127L, -1.251928832280966098829878787499365228659e-19L),
     TEST_c_c (cacos, 0.5L, -0x1p-63L, 1.047197551196597746154214461093167628070L, 1.251928832280966098829878787499365228659e-19L),
     TEST_c_c (cacos, -0.5L, -0x1p-63L, 2.094395102393195492308428922186335256127L, 1.251928832280966098829878787499365228659e-19L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0.5L, 1.570796326794896619231321691639751442099L, -4.812118250596034474977589134243684231352e-1L),
     TEST_c_c (cacos, 0x1.fp-16385L, -0.5L, 1.570796326794896619231321691639751442099L, 4.812118250596034474977589134243684231352e-1L),
     TEST_c_c (cacos, -0x1.fp-16385L, 0.5L, 1.570796326794896619231321691639751442099L, -4.812118250596034474977589134243684231352e-1L),
@@ -2616,7 +2616,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1p-63L, -0x1p-63L, 1.570796326794896619122901474391200998698L, 1.084202172485504434007452800869941711430e-19L),
     TEST_c_c (cacos, -0x1p-63L, 0x1p-63L, 1.570796326794896619339741908888301885499L, -1.084202172485504434007452800869941711430e-19L),
     TEST_c_c (cacos, -0x1p-63L, -0x1p-63L, 1.570796326794896619339741908888301885499L, 1.084202172485504434007452800869941711430e-19L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0x1p-63L, 1.570796326794896619231321691639751442099L, -1.084202172485504434007452800869941711424e-19L),
     TEST_c_c (cacos, 0x1.fp-16385L, -0x1p-63L, 1.570796326794896619231321691639751442099L, 1.084202172485504434007452800869941711424e-19L),
     TEST_c_c (cacos, -0x1.fp-16385L, 0x1p-63L, 1.570796326794896619231321691639751442099L, -1.084202172485504434007452800869941711424e-19L),
@@ -2634,13 +2634,13 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x1p-63L, 0.0L, 1.570796326794896619339741908888301885499L, -0.0L),
     TEST_c_c (cacos, 0x1p-63L, -0.0L, 1.570796326794896619122901474391200998698L, 0.0L),
     TEST_c_c (cacos, -0x1p-63L, -0.0L, 1.570796326794896619339741908888301885499L, 0.0L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0x1.fp-16385L, 1.570796326794896619231321691639751442099L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacos, 0x1.fp-16385L, -0x1.fp-16385L, 1.570796326794896619231321691639751442099L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacos, -0x1.fp-16385L, 0x1.fp-16385L, 1.570796326794896619231321691639751442099L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacos, -0x1.fp-16385L, -0x1.fp-16385L, 1.570796326794896619231321691639751442099L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (cacos, 0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 1.570796326794896619231321691639734010571L, -8.813735870195430252326093249797835932642e-1L),
     TEST_c_c (cacos, 0x1p-105L, -0x0.ffffffffffffffffffffffffffcp0L, 1.570796326794896619231321691639734010571L, 8.813735870195430252326093249797835932642e-1L),
     TEST_c_c (cacos, -0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 1.570796326794896619231321691639768873627L, -8.813735870195430252326093249797835932642e-1L),
@@ -2678,7 +2678,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1p-105L, -0x1p-105L, 1.570796326794896619231321691639726790195L, 2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (cacos, -0x1p-105L, 0x1p-105L, 1.570796326794896619231321691639776094002L, -2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (cacos, -0x1p-105L, -0x1p-105L, 1.570796326794896619231321691639776094002L, 2.465190328815661891911651766508706967729e-32L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacos, 0x1.fp-1025L, 0x1p-105L, 1.570796326794896619231321691639751442099L, -2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (cacos, 0x1.fp-1025L, -0x1p-105L, 1.570796326794896619231321691639751442099L, 2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (cacos, -0x1.fp-1025L, 0x1p-105L, 1.570796326794896619231321691639751442099L, -2.465190328815661891911651766508706967729e-32L),
@@ -2696,7 +2696,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, -0x1p-105L, 0.0L, 1.570796326794896619231321691639776094002L, -0.0L),
     TEST_c_c (cacos, 0x1p-105L, -0.0L, 1.570796326794896619231321691639726790195L, 0.0L),
     TEST_c_c (cacos, -0x1p-105L, -0.0L, 1.570796326794896619231321691639776094002L, 0.0L),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (cacos, 0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 1.570796326794896619231321691639751305915L, -8.813735870195430252326093249797922409363e-1L),
     TEST_c_c (cacos, 0x1p-112L, -0x0.ffffffffffffffffffffffffffff8p0L, 1.570796326794896619231321691639751305915L, 8.813735870195430252326093249797922409363e-1L),
     TEST_c_c (cacos, -0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 1.570796326794896619231321691639751578282L, -8.813735870195430252326093249797922409363e-1L),
@@ -2734,7 +2734,7 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0x1p-112L, -0x1p-112L, 1.570796326794896619231321691639751249506L, 1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (cacos, -0x1p-112L, 0x1p-112L, 1.570796326794896619231321691639751634692L, -1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (cacos, -0x1p-112L, -0x1p-112L, 1.570796326794896619231321691639751634692L, 1.925929944387235853055977942584927318538e-34L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacos, 0x1.fp-16385L, 0x1p-112L, 1.570796326794896619231321691639751442099L, -1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (cacos, 0x1.fp-16385L, -0x1p-112L, 1.570796326794896619231321691639751442099L, 1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (cacos, -0x1.fp-16385L, 0x1p-112L, 1.570796326794896619231321691639751442099L, -1.925929944387235853055977942584927318538e-34L),
@@ -2843,7 +2843,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -1.0L, 0x1p50L, 3.535050620855721078027883819436759661753e1L, 1.570796326794897507409741391764983781004L),
     TEST_c_c (cacosh, 1.0L, -0x1p50L, 3.535050620855721078027883819436759661753e1L, -1.570796326794895731052901991514519103193L),
     TEST_c_c (cacosh, -1.0L, -0x1p50L, 3.535050620855721078027883819436759661753e1L, -1.570796326794897507409741391764983781004L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1p500L, 1.0L, 3.472667374605326000180332928505464606058e2L, 3.054936363499604682051979393213617699789e-151L),
     TEST_c_c (cacosh, 0x1p500L, -1.0L, 3.472667374605326000180332928505464606058e2L, -3.054936363499604682051979393213617699789e-151L),
     TEST_c_c (cacosh, -0x1p500L, 1.0L, 3.472667374605326000180332928505464606058e2L, 3.141592653589793238462643383279502884197L),
@@ -2853,7 +2853,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 1.0L, -0x1p500L, 3.472667374605326000180332928505464606058e2L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -1.0L, -0x1p500L, 3.472667374605326000180332928505464606058e2L, -1.570796326794896619231321691639751442099L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (cacosh, 0x1p5000L, 1.0L, 3.466429049980286492395577839412341016946e3L, 7.079811261048172892385615158694057552948e-1506L),
     TEST_c_c (cacosh, 0x1p5000L, -1.0L, 3.466429049980286492395577839412341016946e3L, -7.079811261048172892385615158694057552948e-1506L),
     TEST_c_c (cacosh, -0x1p5000L, 1.0L, 3.466429049980286492395577839412341016946e3L, 3.141592653589793238462643383279502884197L),
@@ -2864,10 +2864,10 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -1.0L, -0x1p5000L, 3.466429049980286492395577839412341016946e3L, -1.570796326794896619231321691639751442099L),
 #endif
     TEST_c_c (cacosh, 0x1.fp127L, 0x1.fp127L, 8.973081118419833726837456344608533993585e1L, 7.853981633974483096156608458198757210493e-1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp1023L, 0x1.fp1023L, 7.107906849659093345062145442726115449315e2L, 7.853981633974483096156608458198757210493e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (cacosh, 0x1.fp16383L, 0x1.fp16383L, 1.135753137836666928715489992987020363057e4L, 7.853981633974483096156608458198757210493e-1L),
 #endif
     TEST_c_c (cacosh, 0x1.fp-129L, 1.5L, 1.194763217287109304111930828519090523536L, 1.570796326794896619231321691639751442097L),
@@ -2878,7 +2878,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -1.5L, 0x1.fp-129L, 9.624236501192068949955178268487368462704e-1L, 3.141592653589793238462643383279502884195L),
     TEST_c_c (cacosh, 1.5L, -0x1.fp-129L, 9.624236501192068949955178268487368462704e-1L, -2.546345110742945032959687790021055102355e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacosh, -1.5L, -0x1.fp-129L, 9.624236501192068949955178268487368462704e-1L, -3.141592653589793238462643383279502884195L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1025L, 1.5L, 1.194763217287109304111930828519090523536L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-1025L, -1.5L, 1.194763217287109304111930828519090523536L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-1025L, 1.5L, 1.194763217287109304111930828519090523536L, 1.570796326794896619231321691639751442099L),
@@ -2888,7 +2888,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 1.5L, -0x1.fp-1025L, 9.624236501192068949955178268487368462704e-1L, -4.819934639999230680322935210539402497827e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacosh, -1.5L, -0x1.fp-1025L, 9.624236501192068949955178268487368462704e-1L, -3.141592653589793238462643383279502884197L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 1.5L, 1.194763217287109304111930828519090523536L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -1.5L, 1.194763217287109304111930828519090523536L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 1.5L, 1.194763217287109304111930828519090523536L, 1.570796326794896619231321691639751442099L),
@@ -2946,7 +2946,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -1.0L, 0x1.fp-129L, 5.335635276982233498398987585285818977933e-20L, 3.141592653589793238409287030509680549213L),
     TEST_c_c (cacosh, 1.0L, -0x1.fp-129L, 5.335635276982233498398987585285818977933e-20L, -5.335635276982233498398987585285818977930e-20L),
     TEST_c_c (cacosh, -1.0L, -0x1.fp-129L, 5.335635276982233498398987585285818977933e-20L, -3.141592653589793238409287030509680549213L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1000L, 1.0L, 8.813735870195430252326093249797923090282e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-1000L, -1.0L, 8.813735870195430252326093249797923090282e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-1000L, 1.0L, 8.813735870195430252326093249797923090282e-1L, 1.570796326794896619231321691639751442099L),
@@ -2964,7 +2964,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 1.0L, -0x1.fp-1025L, 7.340879205566679497036857179189356754017e-155L, -7.340879205566679497036857179189356754017e-155L),
     TEST_c_c (cacosh, -1.0L, -0x1.fp-1025L, 7.340879205566679497036857179189356754017e-155L, -3.141592653589793238462643383279502884197L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-10000L, 1.0L, 8.813735870195430252326093249797923090282e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-10000L, -1.0L, 8.813735870195430252326093249797923090282e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-10000L, 1.0L, 8.813735870195430252326093249797923090282e-1L, 1.570796326794896619231321691639751442099L),
@@ -3006,7 +3006,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x1.000002p0L, 0.0L, 4.882812451493617206486388134172712975070e-4L, 3.141592653589793238462643383279502884197L),
     TEST_c_c (cacosh, 0x1.000002p0L, -0.0L, 4.882812451493617206486388134172712975070e-4L, -0.0L),
     TEST_c_c (cacosh, -0x1.000002p0L, -0.0L, 4.882812451493617206486388134172712975070e-4L, -3.141592653589793238462643383279502884197L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1p-52L, 0x1.0000000000001p0L, 8.813735870195431822418551933572982483664e-1L, 1.570796326794896462222075823262262934288L),
     TEST_c_c (cacosh, 0x1p-52L, -0x1.0000000000001p0L, 8.813735870195431822418551933572982483664e-1L, -1.570796326794896462222075823262262934288L),
     TEST_c_c (cacosh, -0x1p-52L, 0x1.0000000000001p0L, 8.813735870195431822418551933572982483664e-1L, 1.570796326794896776240567560017239949909L),
@@ -3032,7 +3032,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1.0000000000001p0L, -0.0L, 2.107342425544701550354780375182800088393e-8L, -0.0L),
     TEST_c_c (cacosh, -0x1.0000000000001p0L, -0.0L, 2.107342425544701550354780375182800088393e-8L, -3.141592653589793238462643383279502884197L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (cacosh, 0x1p-63L, 0x1.0000000000000002p0L, 8.813735870195430253092739958139610131001e-1L, 1.570796326794896619154657020805582738031L),
     TEST_c_c (cacosh, 0x1p-63L, -0x1.0000000000000002p0L, 8.813735870195430253092739958139610131001e-1L, -1.570796326794896619154657020805582738031L),
     TEST_c_c (cacosh, -0x1p-63L, 0x1.0000000000000002p0L, 8.813735870195430253092739958139610131001e-1L, 1.570796326794896619307986362473920146166L),
@@ -3041,7 +3041,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x1.0000000000000002p0L, 0x1p-63L, 5.116146586219826555037807251857670783420e-10L, 3.141592653377875508152537040020250564229L),
     TEST_c_c (cacosh, 0x1.0000000000000002p0L, -0x1p-63L, 5.116146586219826555037807251857670783420e-10L, -2.119177303101063432592523199680782317447e-10L),
     TEST_c_c (cacosh, -0x1.0000000000000002p0L, -0x1p-63L, 5.116146586219826555037807251857670783420e-10L, -3.141592653377875508152537040020250564229L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0x1.0000000000000002p0L, 8.813735870195430253092739958139610130980e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0x1.0000000000000002p0L, 8.813735870195430253092739958139610130980e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0x1.0000000000000002p0L, 8.813735870195430253092739958139610130980e-1L, 1.570796326794896619231321691639751442099L),
@@ -3060,7 +3060,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1.0000000000000002p0L, -0.0L, 4.656612873077392578082927418388212703712e-10L, -0.0L),
     TEST_c_c (cacosh, -0x1.0000000000000002p0L, -0.0L, 4.656612873077392578082927418388212703712e-10L, -3.141592653589793238462643383279502884197L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (cacosh, 0x1p-106L, 0x1.000000000000000000000000008p0L, 8.813735870195430252326093249798097405561e-1L, 1.570796326794896619231321691639742726335L),
     TEST_c_c (cacosh, 0x1p-106L, -0x1.000000000000000000000000008p0L, 8.813735870195430252326093249798097405561e-1L, -1.570796326794896619231321691639742726335L),
     TEST_c_c (cacosh, -0x1p-106L, 0x1.000000000000000000000000008p0L, 8.813735870195430252326093249798097405561e-1L, 1.570796326794896619231321691639760157863L),
@@ -3086,7 +3086,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1.000000000000000000000000008p0L, -0.0L, 2.220446049250313080847263336181636063482e-16L, -0.0L),
     TEST_c_c (cacosh, -0x1.000000000000000000000000008p0L, -0.0L, 2.220446049250313080847263336181636063482e-16L, -3.141592653589793238462643383279502884197L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (cacosh, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 8.813735870195430252326093249797924452120e-1L, 1.570796326794896619231321691639751374007L),
     TEST_c_c (cacosh, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 8.813735870195430252326093249797924452120e-1L, -1.570796326794896619231321691639751374007L),
     TEST_c_c (cacosh, -0x1p-113L, 0x1.0000000000000000000000000001p0L, 8.813735870195430252326093249797924452120e-1L, 1.570796326794896619231321691639751510190L),
@@ -3176,7 +3176,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1.fp-129L, -0x1.fp-129L, 2.846900380897727558361783801085126250967e-39L, -1.570796326794896619231321691639751442096L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacosh, -0x1.fp-129L, 0x1.fp-129L, 2.846900380897727558361783801085126250967e-39L, 1.570796326794896619231321691639751442101L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (cacosh, -0x1.fp-129L, -0x1.fp-129L, 2.846900380897727558361783801085126250967e-39L, -1.570796326794896619231321691639751442101L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1p-52L, 0x0.fffffffffffff8p0L, 8.813735870195429467279863907910458761820e-1L, 1.570796326794896462222075823262236786996L),
     TEST_c_c (cacosh, 0x1p-52L, -0x0.fffffffffffff8p0L, 8.813735870195429467279863907910458761820e-1L, -1.570796326794896462222075823262236786996L),
     TEST_c_c (cacosh, -0x1p-52L, 0x0.fffffffffffff8p0L, 8.813735870195429467279863907910458761820e-1L, 1.570796326794896776240567560017266097201L),
@@ -3210,7 +3210,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0.5L, 0x1p-52L, 2.563950248511418570403591756798643804971e-16L, 2.094395102393195492308428922186316279087L),
     TEST_c_c (cacosh, 0.5L, -0x1p-52L, 2.563950248511418570403591756798643804971e-16L, -1.047197551196597746154214461093186605110L),
     TEST_c_c (cacosh, -0.5L, -0x1p-52L, 2.563950248511418570403591756798643804971e-16L, -2.094395102393195492308428922186316279087L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1025L, 0.5L, 4.812118250596034474977589134243684231352e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-1025L, -0.5L, 4.812118250596034474977589134243684231352e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-1025L, 0.5L, 4.812118250596034474977589134243684231352e-1L, 1.570796326794896619231321691639751442099L),
@@ -3224,7 +3224,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1p-52L, -0x1p-52L, 2.220446049250313080847263336181677117148e-16L, -1.570796326794896397186716766608443357372L),
     TEST_c_c (cacosh, -0x1p-52L, 0x1p-52L, 2.220446049250313080847263336181677117148e-16L, 1.570796326794896841275926616671059526825L),
     TEST_c_c (cacosh, -0x1p-52L, -0x1p-52L, 2.220446049250313080847263336181677117148e-16L, -1.570796326794896841275926616671059526825L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1025L, 0x1p-52L, 2.220446049250313080847263336181622378926e-16L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-1025L, -0x1p-52L, 2.220446049250313080847263336181622378926e-16L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-1025L, 0x1p-52L, 2.220446049250313080847263336181622378926e-16L, 1.570796326794896619231321691639751442099L),
@@ -3242,13 +3242,13 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x1p-52L, 0.0L, 0.0L, 1.570796326794896841275926616671059526825L),
     TEST_c_c (cacosh, 0x1p-52L, -0.0L, 0.0L, -1.570796326794896397186716766608443357372L),
     TEST_c_c (cacosh, -0x1p-52L, -0.0L, 0.0L, -1.570796326794896841275926616671059526825L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1025L, 0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacosh, 0x1.fp-1025L, -0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacosh, -0x1.fp-1025L, 0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (cacosh, -0x1.fp-1025L, -0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (cacosh, 0x1p-63L, 0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569937e-1L, 1.570796326794896619154657020805582738025L),
     TEST_c_c (cacosh, 0x1p-63L, -0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569937e-1L, -1.570796326794896619154657020805582738025L),
     TEST_c_c (cacosh, -0x1p-63L, 0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569937e-1L, 1.570796326794896619307986362473920146173L),
@@ -3257,7 +3257,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x0.ffffffffffffffffp0L, 0x1p-63L, 2.588578361325995866221775673638805081337e-10L, 3.141592653170952461345846619605307690007L),
     TEST_c_c (cacosh, 0x0.ffffffffffffffffp0L, -0x1p-63L, 2.588578361325995866221775673638805081337e-10L, -4.188407771167967636741951941902992986043e-10L),
     TEST_c_c (cacosh, -0x0.ffffffffffffffffp0L, -0x1p-63L, 2.588578361325995866221775673638805081337e-10L, -3.141592653170952461345846619605307690007L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569917e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569917e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 8.813735870195430251942769895627079569917e-1L, 1.570796326794896619231321691639751442099L),
@@ -3284,7 +3284,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0.5L, 0x1p-63L, 1.251928832280966098829878787499365228659e-19L, 2.094395102393195492308428922186335256127L),
     TEST_c_c (cacosh, 0.5L, -0x1p-63L, 1.251928832280966098829878787499365228659e-19L, -1.047197551196597746154214461093167628070L),
     TEST_c_c (cacosh, -0.5L, -0x1p-63L, 1.251928832280966098829878787499365228659e-19L, -2.094395102393195492308428922186335256127L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0.5L, 4.812118250596034474977589134243684231352e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0.5L, 4.812118250596034474977589134243684231352e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0.5L, 4.812118250596034474977589134243684231352e-1L, 1.570796326794896619231321691639751442099L),
@@ -3298,7 +3298,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1p-63L, -0x1p-63L, 1.084202172485504434007452800869941711430e-19L, -1.570796326794896619122901474391200998698L),
     TEST_c_c (cacosh, -0x1p-63L, 0x1p-63L, 1.084202172485504434007452800869941711430e-19L, 1.570796326794896619339741908888301885499L),
     TEST_c_c (cacosh, -0x1p-63L, -0x1p-63L, 1.084202172485504434007452800869941711430e-19L, -1.570796326794896619339741908888301885499L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0x1p-63L, 1.084202172485504434007452800869941711424e-19L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0x1p-63L, 1.084202172485504434007452800869941711424e-19L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0x1p-63L, 1.084202172485504434007452800869941711424e-19L, 1.570796326794896619231321691639751442099L),
@@ -3316,13 +3316,13 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x1p-63L, 0.0L, 0.0L, 1.570796326794896619339741908888301885499L),
     TEST_c_c (cacosh, 0x1p-63L, -0.0L, 0.0L, -1.570796326794896619122901474391200998698L),
     TEST_c_c (cacosh, -0x1p-63L, -0.0L, 0.0L, -1.570796326794896619339741908888301885499L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION),
     TEST_c_c (cacosh, -0x1.fp-16385L, -0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (cacosh, 0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 8.813735870195430252326093249797835932642e-1L, 1.570796326794896619231321691639734010571L),
     TEST_c_c (cacosh, 0x1p-105L, -0x0.ffffffffffffffffffffffffffcp0L, 8.813735870195430252326093249797835932642e-1L, -1.570796326794896619231321691639734010571L),
     TEST_c_c (cacosh, -0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 8.813735870195430252326093249797835932642e-1L, 1.570796326794896619231321691639768873627L),
@@ -3360,7 +3360,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1p-105L, -0x1p-105L, 2.465190328815661891911651766508706967729e-32L, -1.570796326794896619231321691639726790195L),
     TEST_c_c (cacosh, -0x1p-105L, 0x1p-105L, 2.465190328815661891911651766508706967729e-32L, 1.570796326794896619231321691639776094002L),
     TEST_c_c (cacosh, -0x1p-105L, -0x1p-105L, 2.465190328815661891911651766508706967729e-32L, -1.570796326794896619231321691639776094002L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (cacosh, 0x1.fp-1025L, 0x1p-105L, 2.465190328815661891911651766508706967729e-32L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-1025L, -0x1p-105L, 2.465190328815661891911651766508706967729e-32L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-1025L, 0x1p-105L, 2.465190328815661891911651766508706967729e-32L, 1.570796326794896619231321691639751442099L),
@@ -3378,7 +3378,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, -0x1p-105L, 0.0L, 0.0L, 1.570796326794896619231321691639776094002L),
     TEST_c_c (cacosh, 0x1p-105L, -0.0L, 0.0L, -1.570796326794896619231321691639726790195L),
     TEST_c_c (cacosh, -0x1p-105L, -0.0L, 0.0L, -1.570796326794896619231321691639776094002L),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (cacosh, 0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 8.813735870195430252326093249797922409363e-1L, 1.570796326794896619231321691639751305915L),
     TEST_c_c (cacosh, 0x1p-112L, -0x0.ffffffffffffffffffffffffffff8p0L, 8.813735870195430252326093249797922409363e-1L, -1.570796326794896619231321691639751305915L),
     TEST_c_c (cacosh, -0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 8.813735870195430252326093249797922409363e-1L, 1.570796326794896619231321691639751578282L),
@@ -3416,7 +3416,7 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0x1p-112L, -0x1p-112L, 1.925929944387235853055977942584927318538e-34L, -1.570796326794896619231321691639751249506L),
     TEST_c_c (cacosh, -0x1p-112L, 0x1p-112L, 1.925929944387235853055977942584927318538e-34L, 1.570796326794896619231321691639751634692L),
     TEST_c_c (cacosh, -0x1p-112L, -0x1p-112L, 1.925929944387235853055977942584927318538e-34L, -1.570796326794896619231321691639751634692L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (cacosh, 0x1.fp-16385L, 0x1p-112L, 1.925929944387235853055977942584927318538e-34L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, 0x1.fp-16385L, -0x1p-112L, 1.925929944387235853055977942584927318538e-34L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (cacosh, -0x1.fp-16385L, 0x1p-112L, 1.925929944387235853055977942584927318538e-34L, 1.570796326794896619231321691639751442099L),
@@ -3569,7 +3569,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -1.0L, 0x1p50L, -8.881784197001252323389053344720723756399e-16L, 3.535050620855721078027883819436759661753e1L),
     TEST_c_c (casin, 1.0L, -0x1p50L, 8.881784197001252323389053344720723756399e-16L, -3.535050620855721078027883819436759661753e1L),
     TEST_c_c (casin, -1.0L, -0x1p50L, -8.881784197001252323389053344720723756399e-16L, -3.535050620855721078027883819436759661753e1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1p500L, 1.0L, 1.570796326794896619231321691639751442099L, 3.472667374605326000180332928505464606058e2L),
     TEST_c_c (casin, 0x1p500L, -1.0L, 1.570796326794896619231321691639751442099L, -3.472667374605326000180332928505464606058e2L),
     TEST_c_c (casin, -0x1p500L, 1.0L, -1.570796326794896619231321691639751442099L, 3.472667374605326000180332928505464606058e2L),
@@ -3579,7 +3579,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 1.0L, -0x1p500L, 3.054936363499604682051979393213617699789e-151L, -3.472667374605326000180332928505464606058e2L),
     TEST_c_c (casin, -1.0L, -0x1p500L, -3.054936363499604682051979393213617699789e-151L, -3.472667374605326000180332928505464606058e2L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (casin, 0x1p5000L, 1.0L, 1.570796326794896619231321691639751442099L, 3.466429049980286492395577839412341016946e3L),
     TEST_c_c (casin, 0x1p5000L, -1.0L, 1.570796326794896619231321691639751442099L, -3.466429049980286492395577839412341016946e3L),
     TEST_c_c (casin, -0x1p5000L, 1.0L, -1.570796326794896619231321691639751442099L, 3.466429049980286492395577839412341016946e3L),
@@ -3591,10 +3591,10 @@ static const struct test_c_c_data casin_test_data[] =
 #endif
 
     TEST_c_c (casin, 0x1.fp127L, 0x1.fp127L, 7.853981633974483096156608458198757210493e-1L, 8.973081118419833726837456344608533993585e1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp1023L, 0x1.fp1023L, 7.853981633974483096156608458198757210493e-1L, 7.107906849659093345062145442726115449315e2L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (casin, 0x1.fp16383L, 0x1.fp16383L, 7.853981633974483096156608458198757210493e-1L, 1.135753137836666928715489992987020363057e4L),
 #endif
 
@@ -3606,7 +3606,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -1.5L, 0x1.fp-129L, -1.570796326794896619231321691639751442096L, 9.624236501192068949955178268487368462704e-1L),
     TEST_c_c (casin, 1.5L, -0x1.fp-129L, 1.570796326794896619231321691639751442096L, -9.624236501192068949955178268487368462704e-1L),
     TEST_c_c (casin, -1.5L, -0x1.fp-129L, -1.570796326794896619231321691639751442096L, -9.624236501192068949955178268487368462704e-1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1025L, 1.5L, 2.989196569048182929051881765490354365918e-309L, 1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, 0x1.fp-1025L, -1.5L, 2.989196569048182929051881765490354365918e-309L, -1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, 1.5L, -2.989196569048182929051881765490354365918e-309L, 1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -3616,7 +3616,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 1.5L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -9.624236501192068949955178268487368462704e-1L),
     TEST_c_c (casin, -1.5L, -0x1.fp-1025L, -1.570796326794896619231321691639751442099L, -9.624236501192068949955178268487368462704e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 1.5L, 4.516698239814521372306784062043266700598e-4933L, 1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -1.5L, 4.516698239814521372306784062043266700598e-4933L, -1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 1.5L, -4.516698239814521372306784062043266700598e-4933L, 1.194763217287109304111930828519090523536L, UNDERFLOW_EXCEPTION),
@@ -3675,7 +3675,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -1.0L, 0x1.fp-129L, -1.570796326794896619177965338869929107115L, 5.335635276982233498398987585285818977933e-20L),
     TEST_c_c (casin, 1.0L, -0x1.fp-129L, 1.570796326794896619177965338869929107115L, -5.335635276982233498398987585285818977933e-20L),
     TEST_c_c (casin, -1.0L, -0x1.fp-129L, -1.570796326794896619177965338869929107115L, -5.335635276982233498398987585285818977933e-20L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1000L, 1.0L, 1.278589251976747242280879285935084814093e-301L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
     TEST_c_c (casin, 0x1.fp-1000L, -1.0L, 1.278589251976747242280879285935084814093e-301L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
     TEST_c_c (casin, -0x1.fp-1000L, 1.0L, -1.278589251976747242280879285935084814093e-301L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
@@ -3693,7 +3693,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 1.0L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -7.340879205566679497036857179189356754017e-155L),
     TEST_c_c (casin, -1.0L, -0x1.fp-1025L, -1.570796326794896619231321691639751442099L, -7.340879205566679497036857179189356754017e-155L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-10000L, 1.0L, 6.867047849047171855399183659351043150871e-3011L, 8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (casin, 0x1.fp-10000L, -1.0L, 6.867047849047171855399183659351043150871e-3011L, -8.813735870195430252326093249797923090282e-1L),
     TEST_c_c (casin, -0x1.fp-10000L, 1.0L, -6.867047849047171855399183659351043150871e-3011L, 8.813735870195430252326093249797923090282e-1L),
@@ -3736,7 +3736,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x1.000002p0L, 0.0L, -1.570796326794896619231321691639751442099L, 4.882812451493617206486388134172712975070e-4L),
     TEST_c_c (casin, 0x1.000002p0L, -0.0L, 1.570796326794896619231321691639751442099L, -4.882812451493617206486388134172712975070e-4L),
     TEST_c_c (casin, -0x1.000002p0L, -0.0L, -1.570796326794896619231321691639751442099L, -4.882812451493617206486388134172712975070e-4L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1p-52L, 0x1.0000000000001p0L, 1.570092458683774885078102529858632363236e-16L, 8.813735870195431822418551933572982483664e-1L),
     TEST_c_c (casin, 0x1p-52L, -0x1.0000000000001p0L, 1.570092458683774885078102529858632363236e-16L, -8.813735870195431822418551933572982483664e-1L),
     TEST_c_c (casin, -0x1p-52L, 0x1.0000000000001p0L, -1.570092458683774885078102529858632363236e-16L, 8.813735870195431822418551933572982483664e-1L),
@@ -3762,7 +3762,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1.0000000000001p0L, -0.0L, 1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L),
     TEST_c_c (casin, -0x1.0000000000001p0L, -0.0L, -1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (casin, 0x1p-63L, 0x1.0000000000000002p0L, 7.666467083416870406778649849746878368519e-20L, 8.813735870195430253092739958139610131001e-1L),
     TEST_c_c (casin, 0x1p-63L, -0x1.0000000000000002p0L, 7.666467083416870406778649849746878368519e-20L, -8.813735870195430253092739958139610131001e-1L),
     TEST_c_c (casin, -0x1p-63L, 0x1.0000000000000002p0L, -7.666467083416870406778649849746878368519e-20L, 8.813735870195430253092739958139610131001e-1L),
@@ -3771,7 +3771,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x1.0000000000000002p0L, 0x1p-63L, -1.570796326582978888921215348380499122131L, 5.116146586219826555037807251857670783420e-10L),
     TEST_c_c (casin, 0x1.0000000000000002p0L, -0x1p-63L, 1.570796326582978888921215348380499122131L, -5.116146586219826555037807251857670783420e-10L),
     TEST_c_c (casin, -0x1.0000000000000002p0L, -0x1p-63L, -1.570796326582978888921215348380499122131L, -5.116146586219826555037807251857670783420e-10L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0x1.0000000000000002p0L, 5.757683115456107043819140328235418018963e-4933L, 8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0x1.0000000000000002p0L, 5.757683115456107043819140328235418018963e-4933L, -8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0x1.0000000000000002p0L, -5.757683115456107043819140328235418018963e-4933L, 8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION),
@@ -3790,7 +3790,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1.0000000000000002p0L, -0.0L, 1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L),
     TEST_c_c (casin, -0x1.0000000000000002p0L, -0.0L, -1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (casin, 0x1p-106L, 0x1.000000000000000000000000008p0L, 8.715763992105246878957416200936726072500e-33L, 8.813735870195430252326093249798097405561e-1L),
     TEST_c_c (casin, 0x1p-106L, -0x1.000000000000000000000000008p0L, 8.715763992105246878957416200936726072500e-33L, -8.813735870195430252326093249798097405561e-1L),
     TEST_c_c (casin, -0x1p-106L, 0x1.000000000000000000000000008p0L, -8.715763992105246878957416200936726072500e-33L, 8.813735870195430252326093249798097405561e-1L),
@@ -3816,7 +3816,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1.000000000000000000000000008p0L, -0.0L, 1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L),
     TEST_c_c (casin, -0x1.000000000000000000000000008p0L, -0.0L, -1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (casin, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 6.809190618832224124185481406981900518193e-35L, 8.813735870195430252326093249797924452120e-1L),
     TEST_c_c (casin, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 6.809190618832224124185481406981900518193e-35L, -8.813735870195430252326093249797924452120e-1L),
     TEST_c_c (casin, -0x1p-113L, 0x1.0000000000000000000000000001p0L, -6.809190618832224124185481406981900518193e-35L, 8.813735870195430252326093249797924452120e-1L),
@@ -3907,7 +3907,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1.fp-129L, -0x1.fp-129L, 2.846900380897727558361783801085126250967e-39L, -2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casin, -0x1.fp-129L, 0x1.fp-129L, -2.846900380897727558361783801085126250967e-39L, 2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casin, -0x1.fp-129L, -0x1.fp-129L, -2.846900380897727558361783801085126250967e-39L, -2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1p-52L, 0x0.fffffffffffff8p0L, 1.570092458683775146551022293016031474627e-16L, 8.813735870195429467279863907910458761820e-1L),
     TEST_c_c (casin, 0x1p-52L, -0x0.fffffffffffff8p0L, 1.570092458683775146551022293016031474627e-16L, -8.813735870195429467279863907910458761820e-1L),
     TEST_c_c (casin, -0x1p-52L, 0x0.fffffffffffff8p0L, -1.570092458683775146551022293016031474627e-16L, 8.813735870195429467279863907910458761820e-1L),
@@ -3941,7 +3941,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0.5L, 0x1p-52L, -5.235987755982988730771072305465648369889e-1L, 2.563950248511418570403591756798643804971e-16L),
     TEST_c_c (casin, 0.5L, -0x1p-52L, 5.235987755982988730771072305465648369889e-1L, -2.563950248511418570403591756798643804971e-16L),
     TEST_c_c (casin, -0.5L, -0x1p-52L, -5.235987755982988730771072305465648369889e-1L, -2.563950248511418570403591756798643804971e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1025L, 0.5L, 4.819934639999230680322935210539402497827e-309L, 4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, 0x1.fp-1025L, -0.5L, 4.819934639999230680322935210539402497827e-309L, -4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, 0.5L, -4.819934639999230680322935210539402497827e-309L, 4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -3955,7 +3955,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1p-52L, -0x1p-52L, 2.220446049250313080847263336181604132852e-16L, -2.220446049250313080847263336181677117148e-16L),
     TEST_c_c (casin, -0x1p-52L, 0x1p-52L, -2.220446049250313080847263336181604132852e-16L, 2.220446049250313080847263336181677117148e-16L),
     TEST_c_c (casin, -0x1p-52L, -0x1p-52L, -2.220446049250313080847263336181604132852e-16L, -2.220446049250313080847263336181677117148e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1025L, 0x1p-52L, 5.388850751072128349671657362289283247603e-309L, 2.220446049250313080847263336181622378926e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, 0x1.fp-1025L, -0x1p-52L, 5.388850751072128349671657362289283247603e-309L, -2.220446049250313080847263336181622378926e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, 0x1p-52L, -5.388850751072128349671657362289283247603e-309L, 2.220446049250313080847263336181622378926e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -3973,13 +3973,13 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x1p-52L, 0.0L, -2.220446049250313080847263336181658871074e-16L, 0.0L),
     TEST_c_c (casin, 0x1p-52L, -0.0L, 2.220446049250313080847263336181658871074e-16L, -0.0L),
     TEST_c_c (casin, -0x1p-52L, -0.0L, -2.220446049250313080847263336181658871074e-16L, -0.0L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1025L, 0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, 0x1.fp-1025L, -0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, 0x1.fp-1025L, -5.388850751072128349671657362289416093031e-309L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, -0x1.fp-1025L, -5.388850751072128349671657362289416093031e-309L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (casin, 0x1p-63L, 0x0.ffffffffffffffffp0L, 7.666467083416870407402049869781566856442e-20L, 8.813735870195430251942769895627079569937e-1L),
     TEST_c_c (casin, 0x1p-63L, -0x0.ffffffffffffffffp0L, 7.666467083416870407402049869781566856442e-20L, -8.813735870195430251942769895627079569937e-1L),
     TEST_c_c (casin, -0x1p-63L, 0x0.ffffffffffffffffp0L, -7.666467083416870407402049869781566856442e-20L, 8.813735870195430251942769895627079569937e-1L),
@@ -3988,7 +3988,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x0.ffffffffffffffffp0L, 0x1p-63L, -1.570796326376055842114524927965556247908L, 2.588578361325995866221775673638805081337e-10L),
     TEST_c_c (casin, 0x0.ffffffffffffffffp0L, -0x1p-63L, 1.570796326376055842114524927965556247908L, -2.588578361325995866221775673638805081337e-10L),
     TEST_c_c (casin, -0x0.ffffffffffffffffp0L, -0x1p-63L, -1.570796326376055842114524927965556247908L, -2.588578361325995866221775673638805081337e-10L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 5.757683115456107044287327268904964422212e-4933L, 8.813735870195430251942769895627079569917e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0x0.ffffffffffffffffp0L, 5.757683115456107044287327268904964422212e-4933L, -8.813735870195430251942769895627079569917e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0x0.ffffffffffffffffp0L, -5.757683115456107044287327268904964422212e-4933L, 8.813735870195430251942769895627079569917e-1L, UNDERFLOW_EXCEPTION),
@@ -4015,7 +4015,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0.5L, 0x1p-63L, -5.235987755982988730771072305465838140283e-1L, 1.251928832280966098829878787499365228659e-19L),
     TEST_c_c (casin, 0.5L, -0x1p-63L, 5.235987755982988730771072305465838140283e-1L, -1.251928832280966098829878787499365228659e-19L),
     TEST_c_c (casin, -0.5L, -0x1p-63L, -5.235987755982988730771072305465838140283e-1L, -1.251928832280966098829878787499365228659e-19L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0.5L, 7.282957076134209141226696333885150260319e-4933L, 4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0.5L, 7.282957076134209141226696333885150260319e-4933L, -4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0.5L, -7.282957076134209141226696333885150260319e-4933L, 4.812118250596034474977589134243684231352e-1L, UNDERFLOW_EXCEPTION),
@@ -4029,7 +4029,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1p-63L, -0x1p-63L, 1.084202172485504434007452800869941711422e-19L, -1.084202172485504434007452800869941711430e-19L),
     TEST_c_c (casin, -0x1p-63L, 0x1p-63L, -1.084202172485504434007452800869941711422e-19L, 1.084202172485504434007452800869941711430e-19L),
     TEST_c_c (casin, -0x1p-63L, -0x1p-63L, -1.084202172485504434007452800869941711422e-19L, -1.084202172485504434007452800869941711430e-19L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0x1p-63L, 8.142593549724601460479922838826119584369e-4933L, 1.084202172485504434007452800869941711424e-19L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0x1p-63L, 8.142593549724601460479922838826119584369e-4933L, -1.084202172485504434007452800869941711424e-19L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0x1p-63L, -8.142593549724601460479922838826119584369e-4933L, 1.084202172485504434007452800869941711424e-19L, UNDERFLOW_EXCEPTION),
@@ -4047,13 +4047,13 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x1p-63L, 0.0L, -1.084202172485504434007452800869941711428e-19L, 0.0L),
     TEST_c_c (casin, 0x1p-63L, -0.0L, 1.084202172485504434007452800869941711428e-19L, -0.0L),
     TEST_c_c (casin, -0x1p-63L, -0.0L, -1.084202172485504434007452800869941711428e-19L, -0.0L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0x1.fp-16385L, -8.142593549724601460479922838826119584417e-4933L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, -0x1.fp-16385L, -8.142593549724601460479922838826119584417e-4933L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (casin, 0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 1.743152798421049375791483240187377443526e-32L, 8.813735870195430252326093249797835932642e-1L),
     TEST_c_c (casin, 0x1p-105L, -0x0.ffffffffffffffffffffffffffcp0L, 1.743152798421049375791483240187377443526e-32L, -8.813735870195430252326093249797835932642e-1L),
     TEST_c_c (casin, -0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, -1.743152798421049375791483240187377443526e-32L, 8.813735870195430252326093249797835932642e-1L),
@@ -4091,7 +4091,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1p-105L, -0x1p-105L, 2.465190328815661891911651766508706967729e-32L, -2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (casin, -0x1p-105L, 0x1p-105L, -2.465190328815661891911651766508706967729e-32L, 2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (casin, -0x1p-105L, -0x1p-105L, -2.465190328815661891911651766508706967729e-32L, -2.465190328815661891911651766508706967729e-32L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casin, 0x1.fp-1025L, 0x1p-105L, 5.388850751072128349671657362289416093031e-309L, 2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, 0x1.fp-1025L, -0x1p-105L, 5.388850751072128349671657362289416093031e-309L, -2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casin, -0x1.fp-1025L, 0x1p-105L, -5.388850751072128349671657362289416093031e-309L, 2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -4109,7 +4109,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, -0x1p-105L, 0.0L, -2.465190328815661891911651766508706967729e-32L, 0.0L),
     TEST_c_c (casin, 0x1p-105L, -0.0L, 2.465190328815661891911651766508706967729e-32L, -0.0L),
     TEST_c_c (casin, -0x1p-105L, -0.0L, -2.465190328815661891911651766508706967729e-32L, -0.0L),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (casin, 0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 1.361838123766444824837096281396380300349e-34L, 8.813735870195430252326093249797922409363e-1L),
     TEST_c_c (casin, 0x1p-112L, -0x0.ffffffffffffffffffffffffffff8p0L, 1.361838123766444824837096281396380300349e-34L, -8.813735870195430252326093249797922409363e-1L),
     TEST_c_c (casin, -0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, -1.361838123766444824837096281396380300349e-34L, 8.813735870195430252326093249797922409363e-1L),
@@ -4147,7 +4147,7 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0x1p-112L, -0x1p-112L, 1.925929944387235853055977942584927318538e-34L, -1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (casin, -0x1p-112L, 0x1p-112L, -1.925929944387235853055977942584927318538e-34L, 1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (casin, -0x1p-112L, -0x1p-112L, -1.925929944387235853055977942584927318538e-34L, -1.925929944387235853055977942584927318538e-34L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casin, 0x1.fp-16385L, 0x1p-112L, 8.142593549724601460479922838826119584417e-4933L, 1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, 0x1.fp-16385L, -0x1p-112L, 8.142593549724601460479922838826119584417e-4933L, -1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casin, -0x1.fp-16385L, 0x1p-112L, -8.142593549724601460479922838826119584417e-4933L, 1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
@@ -4259,7 +4259,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -1.0L, 0x1p50L, -3.535050620855721078027883819436720218708e1L, 1.570796326794895731052901991514519103193L),
     TEST_c_c (casinh, 1.0L, -0x1p50L, 3.535050620855721078027883819436720218708e1L, -1.570796326794895731052901991514519103193L),
     TEST_c_c (casinh, -1.0L, -0x1p50L, -3.535050620855721078027883819436720218708e1L, -1.570796326794895731052901991514519103193L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1p500L, 1.0L, 3.472667374605326000180332928505464606058e2L, 3.054936363499604682051979393213617699789e-151L),
     TEST_c_c (casinh, 0x1p500L, -1.0L, 3.472667374605326000180332928505464606058e2L, -3.054936363499604682051979393213617699789e-151L),
     TEST_c_c (casinh, -0x1p500L, 1.0L, -3.472667374605326000180332928505464606058e2L, 3.054936363499604682051979393213617699789e-151L),
@@ -4269,7 +4269,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 1.0L, -0x1p500L, 3.472667374605326000180332928505464606058e2L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -1.0L, -0x1p500L, -3.472667374605326000180332928505464606058e2L, -1.570796326794896619231321691639751442099L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (casinh, 0x1p5000L, 1.0L, 3.466429049980286492395577839412341016946e3L, 7.079811261048172892385615158694057552948e-1506L),
     TEST_c_c (casinh, 0x1p5000L, -1.0L, 3.466429049980286492395577839412341016946e3L, -7.079811261048172892385615158694057552948e-1506L),
     TEST_c_c (casinh, -0x1p5000L, 1.0L, -3.466429049980286492395577839412341016946e3L, 7.079811261048172892385615158694057552948e-1506L),
@@ -4281,10 +4281,10 @@ static const struct test_c_c_data casinh_test_data[] =
 #endif
 
     TEST_c_c (casinh, 0x1.fp127L, 0x1.fp127L, 8.973081118419833726837456344608533993585e1L, 7.853981633974483096156608458198757210493e-1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp1023L, 0x1.fp1023L, 7.107906849659093345062145442726115449315e2L, 7.853981633974483096156608458198757210493e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (casinh, 0x1.fp16383L, 0x1.fp16383L, 1.135753137836666928715489992987020363057e4L, 7.853981633974483096156608458198757210493e-1L),
 #endif
 
@@ -4296,7 +4296,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -1.5L, 0x1.fp-129L, -1.194763217287109304111930828519090523536L, 1.579176199917649005841160751101628985741e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, 1.5L, -0x1.fp-129L, 1.194763217287109304111930828519090523536L, -1.579176199917649005841160751101628985741e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, -1.5L, -0x1.fp-129L, -1.194763217287109304111930828519090523536L, -1.579176199917649005841160751101628985741e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1025L, 1.5L, 9.624236501192068949955178268487368462704e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, 0x1.fp-1025L, -1.5L, 9.624236501192068949955178268487368462704e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -0x1.fp-1025L, 1.5L, -9.624236501192068949955178268487368462704e-1L, 1.570796326794896619231321691639751442099L),
@@ -4306,7 +4306,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 1.5L, -0x1.fp-1025L, 1.194763217287109304111930828519090523536L, -2.989196569048182929051881765490354365918e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -1.5L, -0x1.fp-1025L, -1.194763217287109304111930828519090523536L, -2.989196569048182929051881765490354365918e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 1.5L, 9.624236501192068949955178268487368462704e-1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, 0x1.fp-16385L, -1.5L, 9.624236501192068949955178268487368462704e-1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -0x1.fp-16385L, 1.5L, -9.624236501192068949955178268487368462704e-1L, 1.570796326794896619231321691639751442099L),
@@ -4365,7 +4365,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -1.0L, 0x1.fp-129L, -8.813735870195430252326093249797923090282e-1L, 2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, 1.0L, -0x1.fp-129L, 8.813735870195430252326093249797923090282e-1L, -2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, -1.0L, -0x1.fp-129L, -8.813735870195430252326093249797923090282e-1L, -2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1000L, 1.0L, 4.252291453851660175550490409247739011867e-151L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, 0x1.fp-1000L, -1.0L, 4.252291453851660175550490409247739011867e-151L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -0x1.fp-1000L, 1.0L, -4.252291453851660175550490409247739011867e-151L, 1.570796326794896619231321691639751442099L),
@@ -4383,7 +4383,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 1.0L, -0x1.fp-1025L, 8.813735870195430252326093249797923090282e-1L, -3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -1.0L, -0x1.fp-1025L, -8.813735870195430252326093249797923090282e-1L, -3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-10000L, 1.0L, 9.854680208706673586644342922051388714633e-1506L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, 0x1.fp-10000L, -1.0L, 9.854680208706673586644342922051388714633e-1506L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -0x1.fp-10000L, 1.0L, -9.854680208706673586644342922051388714633e-1506L, 1.570796326794896619231321691639751442099L),
@@ -4426,7 +4426,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x1.000002p0L, 0.0L, -8.813736713132375348727889167749389235161e-1L, 0.0L),
     TEST_c_c (casinh, 0x1.000002p0L, -0.0L, 8.813736713132375348727889167749389235161e-1L, -0.0L),
     TEST_c_c (casinh, -0x1.000002p0L, -0.0L, -8.813736713132375348727889167749389235161e-1L, -0.0L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1p-52L, 0x1.0000000000001p0L, 2.315303644582684770975188768022139415020e-8L, 1.570796317204594913251280305810847349436L),
     TEST_c_c (casinh, 0x1p-52L, -0x1.0000000000001p0L, 2.315303644582684770975188768022139415020e-8L, -1.570796317204594913251280305810847349436L),
     TEST_c_c (casinh, -0x1p-52L, 0x1.0000000000001p0L, -2.315303644582684770975188768022139415020e-8L, 1.570796317204594913251280305810847349436L),
@@ -4452,7 +4452,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1.0000000000001p0L, -0.0L, 8.813735870195431822418551933572895326024e-1L, -0.0L),
     TEST_c_c (casinh, -0x1.0000000000001p0L, -0.0L, -8.813735870195431822418551933572895326024e-1L, -0.0L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (casinh, 0x1p-63L, 0x1.0000000000000002p0L, 5.116146586219826555037807251857670783420e-10L, 1.570796326582978888921215348380499122131L),
     TEST_c_c (casinh, 0x1p-63L, -0x1.0000000000000002p0L, 5.116146586219826555037807251857670783420e-10L, -1.570796326582978888921215348380499122131L),
     TEST_c_c (casinh, -0x1p-63L, 0x1.0000000000000002p0L, -5.116146586219826555037807251857670783420e-10L, 1.570796326582978888921215348380499122131L),
@@ -4461,7 +4461,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x1.0000000000000002p0L, 0x1p-63L, -8.813735870195430253092739958139610131001e-1L, 7.666467083416870406778649849746878368519e-20L),
     TEST_c_c (casinh, 0x1.0000000000000002p0L, -0x1p-63L, 8.813735870195430253092739958139610131001e-1L, -7.666467083416870406778649849746878368519e-20L),
     TEST_c_c (casinh, -0x1.0000000000000002p0L, -0x1p-63L, -8.813735870195430253092739958139610131001e-1L, -7.666467083416870406778649849746878368519e-20L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, 0x1.fp-16385L, -0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (casinh, -0x1.fp-16385L, 0x1.0000000000000002p0L, -4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L),
@@ -4480,7 +4480,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1.0000000000000002p0L, -0.0L, 8.813735870195430253092739958139610130980e-1L, -0.0L),
     TEST_c_c (casinh, -0x1.0000000000000002p0L, -0.0L, -8.813735870195430253092739958139610130980e-1L, -0.0L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (casinh, 0x1p-106L, 0x1.000000000000000000000000008p0L, 2.285028863093221674154232933662774454211e-16L, 1.570796326794896565289107467733682961928L),
     TEST_c_c (casinh, 0x1p-106L, -0x1.000000000000000000000000008p0L, 2.285028863093221674154232933662774454211e-16L, -1.570796326794896565289107467733682961928L),
     TEST_c_c (casinh, -0x1p-106L, 0x1.000000000000000000000000008p0L, -2.285028863093221674154232933662774454211e-16L, 1.570796326794896565289107467733682961928L),
@@ -4506,7 +4506,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, -0.0L, 8.813735870195430252326093249798097405561e-1L, -0.0L),
     TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, -0.0L, -8.813735870195430252326093249798097405561e-1L, -0.0L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (casinh, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 2.019699255375255198156433710951064632386e-17L, 1.570796326794896614463458507897073960405L),
     TEST_c_c (casinh, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 2.019699255375255198156433710951064632386e-17L, -1.570796326794896614463458507897073960405L),
     TEST_c_c (casinh, -0x1p-113L, 0x1.0000000000000000000000000001p0L, -2.019699255375255198156433710951064632386e-17L, 1.570796326794896614463458507897073960405L),
@@ -4597,7 +4597,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1.fp-129L, -0x1.fp-129L, 2.846900380897727558361783801085126250967e-39L, -2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, -0x1.fp-129L, 0x1.fp-129L, -2.846900380897727558361783801085126250967e-39L, 2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (casinh, -0x1.fp-129L, -0x1.fp-129L, -2.846900380897727558361783801085126250967e-39L, -2.846900380897727558361783801085126250967e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1p-52L, 0x0.fffffffffffff8p0L, 1.171456840272878582596796205397918831268e-8L, 1.570796307840326780080580569360500172043L),
     TEST_c_c (casinh, 0x1p-52L, -0x0.fffffffffffff8p0L, 1.171456840272878582596796205397918831268e-8L, -1.570796307840326780080580569360500172043L),
     TEST_c_c (casinh, -0x1p-52L, 0x0.fffffffffffff8p0L, -1.171456840272878582596796205397918831268e-8L, 1.570796307840326780080580569360500172043L),
@@ -4631,7 +4631,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0.5L, 0x1p-52L, -4.812118250596034474977589134243772428682e-1L, 1.986027322597818397661816253158024383707e-16L),
     TEST_c_c (casinh, 0.5L, -0x1p-52L, 4.812118250596034474977589134243772428682e-1L, -1.986027322597818397661816253158024383707e-16L),
     TEST_c_c (casinh, -0.5L, -0x1p-52L, -4.812118250596034474977589134243772428682e-1L, -1.986027322597818397661816253158024383707e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1025L, 0.5L, 6.222508863508420569166420770843207333493e-309L, 5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, 0x1.fp-1025L, -0.5L, 6.222508863508420569166420770843207333493e-309L, -5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -0x1.fp-1025L, 0.5L, -6.222508863508420569166420770843207333493e-309L, 5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -4645,7 +4645,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1p-52L, -0x1p-52L, 2.220446049250313080847263336181677117148e-16L, -2.220446049250313080847263336181604132852e-16L),
     TEST_c_c (casinh, -0x1p-52L, 0x1p-52L, -2.220446049250313080847263336181677117148e-16L, 2.220446049250313080847263336181604132852e-16L),
     TEST_c_c (casinh, -0x1p-52L, -0x1p-52L, -2.220446049250313080847263336181677117148e-16L, -2.220446049250313080847263336181604132852e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1025L, 0x1p-52L, 5.388850751072128349671657362289548938458e-309L, 2.220446049250313080847263336181658871074e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, 0x1.fp-1025L, -0x1p-52L, 5.388850751072128349671657362289548938458e-309L, -2.220446049250313080847263336181658871074e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -0x1.fp-1025L, 0x1p-52L, -5.388850751072128349671657362289548938458e-309L, 2.220446049250313080847263336181658871074e-16L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -4663,13 +4663,13 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x1p-52L, 0.0L, -2.220446049250313080847263336181622378926e-16L, 0.0L),
     TEST_c_c (casinh, 0x1p-52L, -0.0L, 2.220446049250313080847263336181622378926e-16L, -0.0L),
     TEST_c_c (casinh, -0x1p-52L, -0.0L, -2.220446049250313080847263336181622378926e-16L, -0.0L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1025L, 0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, 0x1.fp-1025L, -0x1.fp-1025L, 5.388850751072128349671657362289416093031e-309L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -0x1.fp-1025L, 0x1.fp-1025L, -5.388850751072128349671657362289416093031e-309L, 5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -0x1.fp-1025L, -0x1.fp-1025L, -5.388850751072128349671657362289416093031e-309L, -5.388850751072128349671657362289416093031e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (casinh, 0x1p-63L, 0x0.ffffffffffffffffp0L, 2.588578361325995866221775673638805081337e-10L, 1.570796326376055842114524927965556247908L),
     TEST_c_c (casinh, 0x1p-63L, -0x0.ffffffffffffffffp0L, 2.588578361325995866221775673638805081337e-10L, -1.570796326376055842114524927965556247908L),
     TEST_c_c (casinh, -0x1p-63L, 0x0.ffffffffffffffffp0L, -2.588578361325995866221775673638805081337e-10L, 1.570796326376055842114524927965556247908L),
@@ -4678,7 +4678,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x0.ffffffffffffffffp0L, 0x1p-63L, -8.813735870195430251942769895627079569937e-1L, 7.666467083416870407402049869781566856442e-20L),
     TEST_c_c (casinh, 0x0.ffffffffffffffffp0L, -0x1p-63L, 8.813735870195430251942769895627079569937e-1L, -7.666467083416870407402049869781566856442e-20L),
     TEST_c_c (casinh, -0x0.ffffffffffffffffp0L, -0x1p-63L, -8.813735870195430251942769895627079569937e-1L, -7.666467083416870407402049869781566856442e-20L),
-# if LDBL_MIN_EXP <= -16381
+# if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0x0.ffffffffffffffffp0L, 2.472906068161537187835415298076415423459e-4923L, 1.570796326465624365239962068302568888898L),
     TEST_c_c (casinh, 0x1.fp-16385L, -0x0.ffffffffffffffffp0L, 2.472906068161537187835415298076415423459e-4923L, -1.570796326465624365239962068302568888898L),
     TEST_c_c (casinh, -0x1.fp-16385L, 0x0.ffffffffffffffffp0L, -2.472906068161537187835415298076415423459e-4923L, 1.570796326465624365239962068302568888898L),
@@ -4705,7 +4705,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0.5L, 0x1p-63L, -4.812118250596034474977589134243684231373e-1L, 9.697399036122160144833087173623140436413e-20L),
     TEST_c_c (casinh, 0.5L, -0x1p-63L, 4.812118250596034474977589134243684231373e-1L, -9.697399036122160144833087173623140436413e-20L),
     TEST_c_c (casinh, -0.5L, -0x1p-63L, -4.812118250596034474977589134243684231373e-1L, -9.697399036122160144833087173623140436413e-20L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0.5L, 9.402257155670418112159334875199821342890e-4933L, 5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, 0x1.fp-16385L, -0.5L, 9.402257155670418112159334875199821342890e-4933L, -5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, -0x1.fp-16385L, 0.5L, -9.402257155670418112159334875199821342890e-4933L, 5.235987755982988730771072305465838140329e-1L, UNDERFLOW_EXCEPTION),
@@ -4719,7 +4719,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1p-63L, -0x1p-63L, 1.084202172485504434007452800869941711430e-19L, -1.084202172485504434007452800869941711422e-19L),
     TEST_c_c (casinh, -0x1p-63L, 0x1p-63L, -1.084202172485504434007452800869941711430e-19L, 1.084202172485504434007452800869941711422e-19L),
     TEST_c_c (casinh, -0x1p-63L, -0x1p-63L, -1.084202172485504434007452800869941711430e-19L, -1.084202172485504434007452800869941711422e-19L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0x1p-63L, 8.142593549724601460479922838826119584465e-4933L, 1.084202172485504434007452800869941711428e-19L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, 0x1.fp-16385L, -0x1p-63L, 8.142593549724601460479922838826119584465e-4933L, -1.084202172485504434007452800869941711428e-19L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, -0x1.fp-16385L, 0x1p-63L, -8.142593549724601460479922838826119584465e-4933L, 1.084202172485504434007452800869941711428e-19L, UNDERFLOW_EXCEPTION),
@@ -4737,13 +4737,13 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x1p-63L, 0.0L, -1.084202172485504434007452800869941711424e-19L, 0.0L),
     TEST_c_c (casinh, 0x1p-63L, -0.0L, 1.084202172485504434007452800869941711424e-19L, -0.0L),
     TEST_c_c (casinh, -0x1p-63L, -0.0L, -1.084202172485504434007452800869941711424e-19L, -0.0L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, 0x1.fp-16385L, -0x1.fp-16385L, 8.142593549724601460479922838826119584417e-4933L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, -0x1.fp-16385L, 0x1.fp-16385L, -8.142593549724601460479922838826119584417e-4933L, 8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, -0x1.fp-16385L, -0x1.fp-16385L, -8.142593549724601460479922838826119584417e-4933L, -8.142593549724601460479922838826119584417e-4933L, UNDERFLOW_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (casinh, 0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, 1.234330349600789959989661887846005659983e-16L, 1.570796326794896419512475791677915736035L),
     TEST_c_c (casinh, 0x1p-105L, -0x0.ffffffffffffffffffffffffffcp0L, 1.234330349600789959989661887846005659983e-16L, -1.570796326794896419512475791677915736035L),
     TEST_c_c (casinh, -0x1p-105L, 0x0.ffffffffffffffffffffffffffcp0L, -1.234330349600789959989661887846005659983e-16L, 1.570796326794896419512475791677915736035L),
@@ -4781,7 +4781,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1p-105L, -0x1p-105L, 2.465190328815661891911651766508706967729e-32L, -2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (casinh, -0x1p-105L, 0x1p-105L, -2.465190328815661891911651766508706967729e-32L, 2.465190328815661891911651766508706967729e-32L),
     TEST_c_c (casinh, -0x1p-105L, -0x1p-105L, -2.465190328815661891911651766508706967729e-32L, -2.465190328815661891911651766508706967729e-32L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (casinh, 0x1.fp-1025L, 0x1p-105L, 5.388850751072128349671657362289416093031e-309L, 2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, 0x1.fp-1025L, -0x1p-105L, 5.388850751072128349671657362289416093031e-309L, -2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (casinh, -0x1.fp-1025L, 0x1p-105L, -5.388850751072128349671657362289416093031e-309L, 2.465190328815661891911651766508706967729e-32L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -4799,7 +4799,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, -0x1p-105L, 0.0L, -2.465190328815661891911651766508706967729e-32L, 0.0L),
     TEST_c_c (casinh, 0x1p-105L, -0.0L, 2.465190328815661891911651766508706967729e-32L, -0.0L),
     TEST_c_c (casinh, -0x1p-105L, -0.0L, -2.465190328815661891911651766508706967729e-32L, -0.0L),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (casinh, 0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, 1.091004200533850618345330909857103457781e-17L, 1.570796326794896601578502908312986698624L),
     TEST_c_c (casinh, 0x1p-112L, -0x0.ffffffffffffffffffffffffffff8p0L, 1.091004200533850618345330909857103457781e-17L, -1.570796326794896601578502908312986698624L),
     TEST_c_c (casinh, -0x1p-112L, 0x0.ffffffffffffffffffffffffffff8p0L, -1.091004200533850618345330909857103457781e-17L, 1.570796326794896601578502908312986698624L),
@@ -4837,7 +4837,7 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0x1p-112L, -0x1p-112L, 1.925929944387235853055977942584927318538e-34L, -1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (casinh, -0x1p-112L, 0x1p-112L, -1.925929944387235853055977942584927318538e-34L, 1.925929944387235853055977942584927318538e-34L),
     TEST_c_c (casinh, -0x1p-112L, -0x1p-112L, -1.925929944387235853055977942584927318538e-34L, -1.925929944387235853055977942584927318538e-34L),
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_c_c (casinh, 0x1.fp-16385L, 0x1p-112L, 8.142593549724601460479922838826119584417e-4933L, 1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, 0x1.fp-16385L, -0x1p-112L, 8.142593549724601460479922838826119584417e-4933L, -1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
     TEST_c_c (casinh, -0x1.fp-16385L, 0x1p-112L, -8.142593549724601460479922838826119584417e-4933L, 1.925929944387235853055977942584927318538e-34L, UNDERFLOW_EXCEPTION),
@@ -4936,7 +4936,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0.0L, 0x1p50L, -1.570796326794896619231321691639751442099L, 8.881784197001252323389053344728897997441e-16L),
     TEST_c_c (catan, 0.0L, -0x1p50L, 1.570796326794896619231321691639751442099L, -8.881784197001252323389053344728897997441e-16L),
     TEST_c_c (catan, -0.0L, -0x1p50L, -1.570796326794896619231321691639751442099L, -8.881784197001252323389053344728897997441e-16L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catan, 0x1p500L, 0.0L, 1.570796326794896619231321691639751442099L, 0.0L),
     TEST_c_c (catan, 0x1p500L, -0.0L, 1.570796326794896619231321691639751442099L, -0.0L),
     TEST_c_c (catan, -0x1p500L, 0.0L, -1.570796326794896619231321691639751442099L, 0.0L),
@@ -4946,7 +4946,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0.0L, -0x1p500L, 1.570796326794896619231321691639751442099L, -3.054936363499604682051979393213617699789e-151L),
     TEST_c_c (catan, -0.0L, -0x1p500L, -1.570796326794896619231321691639751442099L, -3.054936363499604682051979393213617699789e-151L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catan, 0x1p5000L, 0.0L, 1.570796326794896619231321691639751442099L, 0.0L),
     TEST_c_c (catan, 0x1p5000L, -0.0L, 1.570796326794896619231321691639751442099L, -0.0L),
     TEST_c_c (catan, -0x1p5000L, 0.0L, -1.570796326794896619231321691639751442099L, 0.0L),
@@ -4964,7 +4964,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0.5L, 0x1p63L, -1.570796326794896619231321691639751442093L, 1.084202172485504434007452800869941711427e-19L),
     TEST_c_c (catan, 0.5L, -0x1p63L, 1.570796326794896619231321691639751442093L, -1.084202172485504434007452800869941711427e-19L),
     TEST_c_c (catan, -0.5L, -0x1p63L, -1.570796326794896619231321691639751442093L, -1.084202172485504434007452800869941711427e-19L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catan, 0x1p511L, 0.5L, 1.570796326794896619231321691639751442099L, 1.112536929253600691545116358666202032110e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, 0x1p511L, -0.5L, 1.570796326794896619231321691639751442099L, -1.112536929253600691545116358666202032110e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, -0x1p511L, 0.5L, -1.570796326794896619231321691639751442099L, 1.112536929253600691545116358666202032110e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -4974,7 +4974,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0.5L, -0x1p511L, 1.570796326794896619231321691639751442099L, -1.491668146240041348658193063092586767475e-154L),
     TEST_c_c (catan, -0.5L, -0x1p511L, -1.570796326794896619231321691639751442099L, -1.491668146240041348658193063092586767475e-154L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catan, 0x1p8191L, 0.5L, 1.570796326794896619231321691639751442099L, 1.681051571556046753131338908660876301299e-4932L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catan, 0x1p8191L, -0.5L, 1.570796326794896619231321691639751442099L, -1.681051571556046753131338908660876301299e-4932L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catan, -0x1p8191L, 0.5L, -1.570796326794896619231321691639751442099L, 1.681051571556046753131338908660876301299e-4932L, UNDERFLOW_EXCEPTION),
@@ -5004,7 +5004,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x1.fp127L, -0x1.fp127L, 1.570796326794896619231321691639751442097L, -1.516766904286822590927401983512575068153e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catan, -0x1.fp127L, 0x1.fp127L, -1.570796326794896619231321691639751442097L, 1.516766904286822590927401983512575068153e-39L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catan, -0x1.fp127L, -0x1.fp127L, -1.570796326794896619231321691639751442097L, -1.516766904286822590927401983512575068153e-39L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catan, 0x1p900L, 0.0L, 1.570796326794896619231321691639751442099L, 0.0L),
     TEST_c_c (catan, 0x1p900L, -0.0L, 1.570796326794896619231321691639751442099L, -0.0L),
     TEST_c_c (catan, -0x1p900L, 0.0L, -1.570796326794896619231321691639751442099L, 0.0L),
@@ -5026,7 +5026,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0x1.fp1023L, 0x1.fp1023L, -1.570796326794896619231321691639751442099L, 2.871063043235098558826106732041811695767e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, -0x1.fp1023L, -0x1.fp1023L, -1.570796326794896619231321691639751442099L, -2.871063043235098558826106732041811695767e-309L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catan, 0x1p10000L, 0.0L, 1.570796326794896619231321691639751442099L, 0.0L),
     TEST_c_c (catan, 0x1p10000L, -0.0L, 1.570796326794896619231321691639751442099L, -0.0L),
     TEST_c_c (catan, -0x1p10000L, 0.0L, -1.570796326794896619231321691639751442099L, 0.0L),
@@ -5104,7 +5104,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0x0.ffffffp0L, 0x1p-13L, -7.853981373204155542484315721351697277336e-1L, 6.103515973639646453881721999956617260502e-5L),
     TEST_c_c (catan, 0x0.ffffffp0L, -0x1p-13L, 7.853981373204155542484315721351697277336e-1L, -6.103515973639646453881721999956617260502e-5L),
     TEST_c_c (catan, -0x0.ffffffp0L, -0x1p-13L, -7.853981373204155542484315721351697277336e-1L, -6.103515973639646453881721999956617260502e-5L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catan, 0x1p-27L, 0x1.0000000000001p0L, 7.853981801612546526942695000283242525531e-1L, 9.704060527839234168777242958594699810015L),
     TEST_c_c (catan, 0x1p-27L, -0x1.0000000000001p0L, 7.853981801612546526942695000283242525531e-1L, -9.704060527839234168777242958594699810015L),
     TEST_c_c (catan, -0x1p-27L, 0x1.0000000000001p0L, -7.853981801612546526942695000283242525531e-1L, 9.704060527839234168777242958594699810015L),
@@ -5122,7 +5122,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x0.fffffffffffff8p0L, -0x1p-27L, 7.853981633974482679822974223765039144191e-1L, -3.725290298461914441624447420137706700965e-9L),
     TEST_c_c (catan, -0x0.fffffffffffff8p0L, -0x1p-27L, -7.853981633974482679822974223765039144191e-1L, -3.725290298461914441624447420137706700965e-9L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (catan, 0x1p-33L, 0x1.0000000000000002p0L, 7.853981638922134273801338071094141188767e-1L, 1.178350206951907025990405771755129268176e1L),
     TEST_c_c (catan, 0x1p-33L, -0x1.0000000000000002p0L, 7.853981638922134273801338071094141188767e-1L, -1.178350206951907025990405771755129268176e1L),
     TEST_c_c (catan, -0x1p-33L, 0x1.0000000000000002p0L, -7.853981638922134273801338071094141188767e-1L, 1.178350206951907025990405771755129268176e1L),
@@ -5140,7 +5140,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x0.ffffffffffffffffp0L, -0x1p-33L, 7.853981633974483095919439232967553115548e-1L, -5.820766091346740722958646680334721192083e-11L),
     TEST_c_c (catan, -0x0.ffffffffffffffffp0L, -0x1p-33L, -7.853981633974483095919439232967553115548e-1L, -5.820766091346740722958646680334721192083e-11L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (catan, 0x1p-54L, 0x1.000000000000000000000000008p0L, 7.853981633974485455380535786656405610710e-1L, 1.906154746539849600897388334009981267384e1L),
     TEST_c_c (catan, 0x1p-54L, -0x1.000000000000000000000000008p0L, 7.853981633974485455380535786656405610710e-1L, -1.906154746539849600897388334009981267384e1L),
     TEST_c_c (catan, -0x1p-54L, 0x1.000000000000000000000000008p0L, -7.853981633974485455380535786656405610710e-1L, 1.906154746539849600897388334009981267384e1L),
@@ -5158,7 +5158,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x0.ffffffffffffffffffffffffffcp0L, -0x1p-54L, 7.853981633974483096156608458198703284454e-1L, -2.775557561562891351059079170227083567164e-17L),
     TEST_c_c (catan, -0x0.ffffffffffffffffffffffffffcp0L, -0x1p-54L, -7.853981633974483096156608458198703284454e-1L, -2.775557561562891351059079170227083567164e-17L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (catan, 0x1p-57L, 0x1.0000000000000000000000000001p0L, 7.853981633974483252281721296111395707566e-1L, 2.010126823623841397309973152228712033275e1L),
     TEST_c_c (catan, 0x1p-57L, -0x1.0000000000000000000000000001p0L, 7.853981633974483252281721296111395707566e-1L, -2.010126823623841397309973152228712033275e1L),
     TEST_c_c (catan, -0x1p-57L, 0x1.0000000000000000000000000001p0L, -7.853981633974483252281721296111395707566e-1L, 2.010126823623841397309973152228712033275e1L),
@@ -5216,7 +5216,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0x1p-126L, 0x0.ffffffp0L, -9.860761609136244031334147100512154160097e-32L, 8.664339742098154951823135931565866792454L),
     TEST_c_c (catan, 0x1p-126L, -0x0.ffffffp0L, 9.860761609136244031334147100512154160097e-32L, -8.664339742098154951823135931565866792454L),
     TEST_c_c (catan, -0x1p-126L, -0x0.ffffffp0L, -9.860761609136244031334147100512154160097e-32L, -8.664339742098154951823135931565866792454L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catan, 1.0L, 0x1p-512L, 7.853981633974483096156608458198757210493e-1L, 3.729170365600103371645482657731466918688e-155L),
     TEST_c_c (catan, 1.0L, -0x1p-512L, 7.853981633974483096156608458198757210493e-1L, -3.729170365600103371645482657731466918688e-155L),
     TEST_c_c (catan, -1.0L, 0x1p-512L, -7.853981633974483096156608458198757210493e-1L, 3.729170365600103371645482657731466918688e-155L),
@@ -5258,7 +5258,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x1p-1022L, -0x0.fffffffffffff8p0L, 1.002084180004486444624900488355118689113e-292L, -1.871497387511852332650969166374185305708e1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
     TEST_c_c (catan, -0x1p-1022L, -0x0.fffffffffffff8p0L, -1.002084180004486444624900488355118689113e-292L, -1.871497387511852332650969166374185305708e1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (catan, 0x1.0000000000000002p0L, 0x1p-1022L, 7.853981633974483096698709544441509427467e-1L, 1.112536929253600691424494863099491450042e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, 0x1.0000000000000002p0L, -0x1p-1022L, 7.853981633974483096698709544441509427467e-1L, -1.112536929253600691424494863099491450042e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, -0x1.0000000000000002p0L, 0x1p-1022L, -7.853981633974483096698709544441509427467e-1L, 1.112536929253600691424494863099491450042e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -5276,7 +5276,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x1p-1022L, -0x0.ffffffffffffffffp0L, 2.052268400649188124723641491045245971623e-289L, -2.252728336819822255604649142023466965703e1L),
     TEST_c_c (catan, -0x1p-1022L, -0x0.ffffffffffffffffp0L, -2.052268400649188124723641491045245971623e-289L, -2.252728336819822255604649142023466965703e1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (catan, 0x1.000000000000000000000000008p0L, 0x1p-1022L, 7.853981633974483096156608458198880470009e-1L, 1.112536929253600691545116358666174605957e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, 0x1.000000000000000000000000008p0L, -0x1p-1022L, 7.853981633974483096156608458198880470009e-1L, -1.112536929253600691545116358666174605957e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catan, -0x1.000000000000000000000000008p0L, 0x1p-1022L, -7.853981633974483096156608458198880470009e-1L, 1.112536929253600691545116358666174605957e-308L, UNDERFLOW_EXCEPTION_DOUBLE),
@@ -5294,7 +5294,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0x1p-1022L, -0x0.ffffffffffffffffffffffffffcp0L, 9.025971879324147880346310405868788320726e-277L, -3.708337415995707405382191849801244331055e1L),
     TEST_c_c (catan, -0x1p-1022L, -0x0.ffffffffffffffffffffffffffcp0L, -9.025971879324147880346310405868788320726e-277L, -3.708337415995707405382191849801244331055e1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catan, 1.0L, 0x1p-8192L, 7.853981633974483096156608458198757210493e-1L, 4.584009668887117914053530980121207914891e-2467L),
     TEST_c_c (catan, 1.0L, -0x1p-8192L, 7.853981633974483096156608458198757210493e-1L, -4.584009668887117914053530980121207914891e-2467L),
     TEST_c_c (catan, -1.0L, 0x1p-8192L, -7.853981633974483096156608458198757210493e-1L, 4.584009668887117914053530980121207914891e-2467L),
@@ -5343,7 +5343,7 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, -0x1p-16382L, 0x0.ffffffffffffffffp0L, -3.100992811520163369065387859792822623745e-4913L, 2.252728336819822255604649142023466965703e1L),
     TEST_c_c (catan, 0x1p-16382L, -0x0.ffffffffffffffffp0L, 3.100992811520163369065387859792822623745e-4913L, -2.252728336819822255604649142023466965703e1L),
     TEST_c_c (catan, -0x1p-16382L, -0x0.ffffffffffffffffp0L, -3.100992811520163369065387859792822623745e-4913L, -2.252728336819822255604649142023466965703e1L),
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_c_c (catan, 0x1.0000000000000000000000000001p0L, 0x1p-16382L, 7.853981633974483096156608458198758173458e-1L, 1.681051571556046753131338908660875977540e-4932L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catan, 0x1.0000000000000000000000000001p0L, -0x1p-16382L, 7.853981633974483096156608458198758173458e-1L, -1.681051571556046753131338908660875977540e-4932L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catan, -0x1.0000000000000000000000000001p0L, 0x1p-16382L, -7.853981633974483096156608458198758173458e-1L, 1.681051571556046753131338908660875977540e-4932L, UNDERFLOW_EXCEPTION),
@@ -5441,7 +5441,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0.0L, 0x1p50L, -0.0L, 1.570796326794895731052901991514519103193L),
     TEST_c_c (catanh, 0.0L, -0x1p50L, 0.0L, -1.570796326794895731052901991514519103193L),
     TEST_c_c (catanh, -0.0L, -0x1p50L, -0.0L, -1.570796326794895731052901991514519103193L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catanh, 0x1p500L, 0.0L, 3.054936363499604682051979393213617699789e-151L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p500L, -0.0L, 3.054936363499604682051979393213617699789e-151L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p500L, 0.0L, -3.054936363499604682051979393213617699789e-151L, 1.570796326794896619231321691639751442099L),
@@ -5451,7 +5451,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0.0L, -0x1p500L, 0.0L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0.0L, -0x1p500L, -0.0L, -1.570796326794896619231321691639751442099L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catanh, 0x1p5000L, 0.0L, 7.079811261048172892385615158694057552948e-1506L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p5000L, -0.0L, 7.079811261048172892385615158694057552948e-1506L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p5000L, 0.0L, -7.079811261048172892385615158694057552948e-1506L, 1.570796326794896619231321691639751442099L),
@@ -5469,7 +5469,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0.5L, 0x1p63L, -5.877471754111437539843682686111228389007e-39L, 1.570796326794896619122901474391200998698L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, 0.5L, -0x1p63L, 5.877471754111437539843682686111228389007e-39L, -1.570796326794896619122901474391200998698L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, -0.5L, -0x1p63L, -5.877471754111437539843682686111228389007e-39L, -1.570796326794896619122901474391200998698L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catanh, 0x1p511L, 0.5L, 1.491668146240041348658193063092586767475e-154L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p511L, -0.5L, 1.491668146240041348658193063092586767475e-154L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p511L, 0.5L, -1.491668146240041348658193063092586767475e-154L, 1.570796326794896619231321691639751442099L),
@@ -5479,7 +5479,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0.5L, -0x1p511L, 1.112536929253600691545116358666202032110e-308L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catanh, -0.5L, -0x1p511L, -1.112536929253600691545116358666202032110e-308L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catanh, 0x1p8191L, 0.5L, 1.833603867554847165621412392048483165956e-2466L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p8191L, -0.5L, 1.833603867554847165621412392048483165956e-2466L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p8191L, 0.5L, -1.833603867554847165621412392048483165956e-2466L, 1.570796326794896619231321691639751442099L),
@@ -5509,7 +5509,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x1.fp127L, -0x1.fp127L, 1.516766904286822590927401983512575068153e-39L, -1.570796326794896619231321691639751442097L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, -0x1.fp127L, 0x1.fp127L, -1.516766904286822590927401983512575068153e-39L, 1.570796326794896619231321691639751442097L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, -0x1.fp127L, -0x1.fp127L, -1.516766904286822590927401983512575068153e-39L, -1.570796326794896619231321691639751442097L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catanh, 0x1p900L, 0.0L, 1.183052186166774710972751597518026531652e-271L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p900L, -0.0L, 1.183052186166774710972751597518026531652e-271L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p900L, 0.0L, -1.183052186166774710972751597518026531652e-271L, 1.570796326794896619231321691639751442099L),
@@ -5531,7 +5531,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0x1.fp1023L, 0x1.fp1023L, -2.871063043235098558826106732041811695767e-309L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catanh, -0x1.fp1023L, -0x1.fp1023L, -2.871063043235098558826106732041811695767e-309L, -1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catanh, 0x1p10000L, 0.0L, 5.012372749206452009297555933742977749322e-3011L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1p10000L, -0.0L, 5.012372749206452009297555933742977749322e-3011L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1p10000L, 0.0L, -5.012372749206452009297555933742977749322e-3011L, 1.570796326794896619231321691639751442099L),
@@ -5609,7 +5609,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0x0.ffffffp0L, 0x1p-13L, -4.852030190345140708455871037447717761868L, 7.851845403708474595909269086711426246675e-1L),
     TEST_c_c (catanh, 0x0.ffffffp0L, -0x1p-13L, 4.852030190345140708455871037447717761868L, -7.851845403708474595909269086711426246675e-1L),
     TEST_c_c (catanh, -0x0.ffffffp0L, -0x1p-13L, -4.852030190345140708455871037447717761868L, -7.851845403708474595909269086711426246675e-1L),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catanh, 0x1p-27L, 0x1.0000000000001p0L, 3.725290298461913200853528590596263270474e-9L, 7.853981633974484345157511161499711112683e-1L),
     TEST_c_c (catanh, 0x1p-27L, -0x1.0000000000001p0L, 3.725290298461913200853528590596263270474e-9L, -7.853981633974484345157511161499711112683e-1L),
     TEST_c_c (catanh, -0x1p-27L, 0x1.0000000000001p0L, -3.725290298461913200853528590596263270474e-9L, 7.853981633974484345157511161499711112683e-1L),
@@ -5627,7 +5627,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x0.fffffffffffff8p0L, -0x1p-27L, 9.704060527839234252043969805481351363824L, -7.853981578095128619227903983047292781021e-1L),
     TEST_c_c (catanh, -0x0.fffffffffffff8p0L, -0x1p-27L, -9.704060527839234252043969805481351363824L, -7.853981578095128619227903983047292781021e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (catanh, 0x1p-33L, 0x1.0000000000000002p0L, 5.820766091346740722012013594069507025615e-11L, 7.853981633974483096732590862331681441026e-1L),
     TEST_c_c (catanh, 0x1p-33L, -0x1.0000000000000002p0L, 5.820766091346740722012013594069507025615e-11L, -7.853981633974483096732590862331681441026e-1L),
     TEST_c_c (catanh, -0x1p-33L, 0x1.0000000000000002p0L, -5.820766091346740722012013594069507025615e-11L, 7.853981633974483096732590862331681441026e-1L),
@@ -5645,7 +5645,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x0.ffffffffffffffffp0L, -0x1p-33L, 1.178350206951907026002603046195591193050e1L, -7.853981631937214964185249205444919953948e-1L),
     TEST_c_c (catanh, -0x0.ffffffffffffffffp0L, -0x1p-33L, -1.178350206951907026002603046195591193050e1L, -7.853981631937214964185249205444919953948e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (catanh, 0x1p-54L, 0x1.000000000000000000000000008p0L, 2.775557561562891351059079170226980932999e-17L, 7.853981633974483096156608458198888173729e-1L),
     TEST_c_c (catanh, 0x1p-54L, -0x1.000000000000000000000000008p0L, 2.775557561562891351059079170226980932999e-17L, -7.853981633974483096156608458198888173729e-1L),
     TEST_c_c (catanh, -0x1p-54L, 0x1.000000000000000000000000008p0L, -2.775557561562891351059079170226980932999e-17L, 7.853981633974483096156608458198888173729e-1L),
@@ -5663,7 +5663,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x0.ffffffffffffffffffffffffffcp0L, -0x1p-54L, 1.906154746539849600897388334009984040723e1L, -7.853981633974482124711461911186784339815e-1L),
     TEST_c_c (catanh, -0x0.ffffffffffffffffffffffffffcp0L, -0x1p-54L, -1.906154746539849600897388334009984040723e1L, -7.853981633974482124711461911186784339815e-1L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_c_c (catanh, 0x1p-57L, 0x1.0000000000000000000000000001p0L, 3.469446951953614188823848962783812780530e-18L, 7.853981633974483096156608458198758293829e-1L),
     TEST_c_c (catanh, 0x1p-57L, -0x1.0000000000000000000000000001p0L, 3.469446951953614188823848962783812780530e-18L, -7.853981633974483096156608458198758293829e-1L),
     TEST_c_c (catanh, -0x1p-57L, 0x1.0000000000000000000000000001p0L, -3.469446951953614188823848962783812780530e-18L, 7.853981633974483096156608458198758293829e-1L),
@@ -5721,7 +5721,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0x1p-126L, 0x0.ffffffp0L, -5.877472104436064061535099214664320916184e-39L, 7.853981335951250337419109991749089175724e-1L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, 0x1p-126L, -0x0.ffffffp0L, 5.877472104436064061535099214664320916184e-39L, -7.853981335951250337419109991749089175724e-1L, UNDERFLOW_EXCEPTION_FLOAT),
     TEST_c_c (catanh, -0x1p-126L, -0x0.ffffffp0L, -5.877472104436064061535099214664320916184e-39L, -7.853981335951250337419109991749089175724e-1L, UNDERFLOW_EXCEPTION_FLOAT),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (catanh, 1.0L, 0x1p-512L, 1.777922518136259718655200391540222897114e2L, 7.853981633974483096156608458198757210493e-1L),
     TEST_c_c (catanh, 1.0L, -0x1p-512L, 1.777922518136259718655200391540222897114e2L, -7.853981633974483096156608458198757210493e-1L),
     TEST_c_c (catanh, -1.0L, 0x1p-512L, -1.777922518136259718655200391540222897114e2L, 7.853981633974483096156608458198757210493e-1L),
@@ -5763,7 +5763,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x1p-1022L, -0x0.fffffffffffff8p0L, 1.112536929253600815061527818977844932790e-308L, -7.853981633974482541045096145620456183798e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catanh, -0x1p-1022L, -0x0.fffffffffffff8p0L, -1.112536929253600815061527818977844932790e-308L, -7.853981633974482541045096145620456183798e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_c_c (catanh, 0x1.0000000000000002p0L, 0x1p-1022L, 2.218070977791824990137853294097378778927e1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1.0000000000000002p0L, -0x1p-1022L, 2.218070977791824990137853294097378778927e1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1.0000000000000002p0L, 0x1p-1022L, -2.218070977791824990137853294097378778927e1L, 1.570796326794896619231321691639751442099L),
@@ -5781,7 +5781,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x1p-1022L, -0x0.ffffffffffffffffp0L, 1.112536929253600691605427106449557323148e-308L, -7.853981633974483095885557915077381101984e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catanh, -0x1p-1022L, -0x0.ffffffffffffffffp0L, -1.112536929253600691605427106449557323148e-308L, -7.853981633974483095885557915077381101984e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_c_c (catanh, 0x1.000000000000000000000000008p0L, 0x1p-1022L, 3.673680056967710139911330243728336427098e1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1.000000000000000000000000008p0L, -0x1p-1022L, 3.673680056967710139911330243728336427098e1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1.000000000000000000000000008p0L, 0x1p-1022L, -3.673680056967710139911330243728336427098e1L, 1.570796326794896619231321691639751442099L),
@@ -5799,7 +5799,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 0x1p-1022L, -0x0.ffffffffffffffffffffffffffcp0L, 1.112536929253600691545116358666215745186e-308L, -7.853981633974483096156608458198695580735e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
     TEST_c_c (catanh, -0x1p-1022L, -0x0.ffffffffffffffffffffffffffcp0L, -1.112536929253600691545116358666215745186e-308L, -7.853981633974483096156608458198695580735e-1L, UNDERFLOW_EXCEPTION_DOUBLE),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (catanh, 1.0L, 0x1p-8192L, 2.839477425163815960027691385553420311121e3L, 7.853981633974483096156608458198757210493e-1L),
     TEST_c_c (catanh, 1.0L, -0x1p-8192L, 2.839477425163815960027691385553420311121e3L, -7.853981633974483096156608458198757210493e-1L),
     TEST_c_c (catanh, -1.0L, 0x1p-8192L, -2.839477425163815960027691385553420311121e3L, 7.853981633974483096156608458198757210493e-1L),
@@ -5848,7 +5848,7 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, -0x1p-16382L, 0x0.ffffffffffffffffp0L, -1.681051571556046753222468896957938166365e-4932L, 7.853981633974483095885557915077381101984e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catanh, 0x1p-16382L, -0x0.ffffffffffffffffp0L, 1.681051571556046753222468896957938166365e-4932L, -7.853981633974483095885557915077381101984e-1L, UNDERFLOW_EXCEPTION),
     TEST_c_c (catanh, -0x1p-16382L, -0x0.ffffffffffffffffp0L, -1.681051571556046753222468896957938166365e-4932L, -7.853981633974483095885557915077381101984e-1L, UNDERFLOW_EXCEPTION),
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_c_c (catanh, 0x1.0000000000000000000000000001p0L, 0x1p-16382L, 3.916281570163690998207361486238697614441e1L, 1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, 0x1.0000000000000000000000000001p0L, -0x1p-16382L, 3.916281570163690998207361486238697614441e1L, -1.570796326794896619231321691639751442099L),
     TEST_c_c (catanh, -0x1.0000000000000000000000000001p0L, 0x1p-16382L, -3.916281570163690998207361486238697614441e1L, 1.570796326794896619231321691639751442099L),
@@ -6070,7 +6070,7 @@ static const struct test_f_f_data ceil_test_data[] =
     TEST_f_f (ceil, -0x1p114, -0x1p114, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (ceil, -max_value, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (ceil, 4503599627370495.5L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 4503599627370496.25L, 4503599627370497.0L, ERRNO_UNCHANGED),
@@ -6084,7 +6084,7 @@ static const struct test_f_f_data ceil_test_data[] =
     TEST_f_f (ceil, -4503599627370496.75L, -4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, -4503599627370497.5L, -4503599627370497.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (ceil, 4503599627370494.5000000000001L, 4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 4503599627370495.5000000000001L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 4503599627370496.5000000000001L, 4503599627370497.0L, ERRNO_UNCHANGED),
@@ -6105,7 +6105,7 @@ static const struct test_f_f_data ceil_test_data[] =
     TEST_f_f (ceil, -9007199254740992.75L, -9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, -9007199254740993.5L, -9007199254740993.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (ceil, 9007199254740991.0000000000001L, 9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 9007199254740992.0000000000001L, 9007199254740993.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 9007199254740993.0000000000001L, 9007199254740994.0L, ERRNO_UNCHANGED),
@@ -6137,7 +6137,7 @@ static const struct test_f_f_data ceil_test_data[] =
        the precision is determined by second long double for IBM long double.  */
     TEST_f_f (ceil,  34503599627370498.515625L, 34503599627370499.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, -34503599627370498.515625L, -34503599627370498.0L, ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_f (ceil,  1192568192774434123539907640624.484375L, 1192568192774434123539907640625.0L, ERRNO_UNCHANGED),
     TEST_f_f (ceil, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L, ERRNO_UNCHANGED),
 # endif
@@ -6747,11 +6747,11 @@ static const struct test_c_c_data ctan_test_data[] =
     TEST_c_c (ctan, min_subnorm_value, plus_infty, 0.0, 1.0),
     TEST_c_c (ctan, 0x1p127, plus_infty, 0.0, 1.0),
     TEST_c_c (ctan, 0x1.11p127, plus_infty, minus_zero, 1.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctan, 0x1p1023, plus_infty, minus_zero, 1.0),
     TEST_c_c (ctan, 0x1.5p1023, plus_infty, 0.0, 1.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctan, 0x1p16383L, plus_infty, 0.0, 1.0),
     TEST_c_c (ctan, 0x1.2p16383L, plus_infty, minus_zero, 1.0),
 #endif
@@ -6764,11 +6764,11 @@ static const struct test_c_c_data ctan_test_data[] =
     TEST_c_c (ctan, -min_subnorm_value, plus_infty, minus_zero, 1.0),
     TEST_c_c (ctan, -0x1p127, plus_infty, minus_zero, 1.0),
     TEST_c_c (ctan, -0x1.11p127, plus_infty, 0.0, 1.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctan, -0x1p1023, plus_infty, 0.0, 1.0),
     TEST_c_c (ctan, -0x1.5p1023, plus_infty, minus_zero, 1.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctan, -0x1p16383L, plus_infty, minus_zero, 1.0),
     TEST_c_c (ctan, -0x1.2p16383L, plus_infty, 0.0, 1.0),
 #endif
@@ -6782,11 +6782,11 @@ static const struct test_c_c_data ctan_test_data[] =
     TEST_c_c (ctan, min_subnorm_value, minus_infty, 0.0, -1.0),
     TEST_c_c (ctan, 0x1p127, minus_infty, 0.0, -1.0),
     TEST_c_c (ctan, 0x1.11p127, minus_infty, minus_zero, -1.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctan, 0x1p1023, minus_infty, minus_zero, -1.0),
     TEST_c_c (ctan, 0x1.5p1023, minus_infty, 0.0, -1.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctan, 0x1p16383L, minus_infty, 0.0, -1.0),
     TEST_c_c (ctan, 0x1.2p16383L, minus_infty, minus_zero, -1.0),
 #endif
@@ -6799,11 +6799,11 @@ static const struct test_c_c_data ctan_test_data[] =
     TEST_c_c (ctan, -min_subnorm_value, minus_infty, minus_zero, -1.0),
     TEST_c_c (ctan, -0x1p127, minus_infty, minus_zero, -1.0),
     TEST_c_c (ctan, -0x1.11p127, minus_infty, 0.0, -1.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctan, -0x1p1023, minus_infty, 0.0, -1.0),
     TEST_c_c (ctan, -0x1.5p1023, minus_infty, minus_zero, -1.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctan, -0x1p16383L, minus_infty, minus_zero, -1.0),
     TEST_c_c (ctan, -0x1.2p16383L, minus_infty, 0.0, -1.0),
 #endif
@@ -6858,11 +6858,11 @@ static const struct test_c_c_data ctanh_test_data[] =
     TEST_c_c (ctanh, plus_infty, min_subnorm_value, 1.0, 0.0),
     TEST_c_c (ctanh, plus_infty, 0x1p127, 1.0, 0.0),
     TEST_c_c (ctanh, plus_infty, 0x1.11p127, 1.0, minus_zero),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctanh, plus_infty, 0x1p1023, 1.0, minus_zero),
     TEST_c_c (ctanh, plus_infty, 0x1.5p1023, 1.0, 0.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctanh, plus_infty, 0x1p16383L, 1.0, 0.0),
     TEST_c_c (ctanh, plus_infty, 0x1.2p16383L, 1.0, minus_zero),
 #endif
@@ -6875,11 +6875,11 @@ static const struct test_c_c_data ctanh_test_data[] =
     TEST_c_c (ctanh, plus_infty, -min_subnorm_value, 1.0, minus_zero),
     TEST_c_c (ctanh, plus_infty, -0x1p127, 1.0, minus_zero),
     TEST_c_c (ctanh, plus_infty, -0x1.11p127, 1.0, 0.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctanh, plus_infty, -0x1p1023, 1.0, 0.0),
     TEST_c_c (ctanh, plus_infty, -0x1.5p1023, 1.0, minus_zero),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctanh, plus_infty, -0x1p16383L, 1.0, minus_zero),
     TEST_c_c (ctanh, plus_infty, -0x1.2p16383L, 1.0, 0.0),
 #endif
@@ -6892,11 +6892,11 @@ static const struct test_c_c_data ctanh_test_data[] =
     TEST_c_c (ctanh, minus_infty, min_subnorm_value, -1.0, 0.0),
     TEST_c_c (ctanh, minus_infty, 0x1p127, -1.0, 0.0),
     TEST_c_c (ctanh, minus_infty, 0x1.11p127, -1.0, minus_zero),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctanh, minus_infty, 0x1p1023, -1.0, minus_zero),
     TEST_c_c (ctanh, minus_infty, 0x1.5p1023, -1.0, 0.0),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctanh, minus_infty, 0x1p16383L, -1.0, 0.0),
     TEST_c_c (ctanh, minus_infty, 0x1.2p16383L, -1.0, minus_zero),
 #endif
@@ -6909,11 +6909,11 @@ static const struct test_c_c_data ctanh_test_data[] =
     TEST_c_c (ctanh, minus_infty, -min_subnorm_value, -1.0, minus_zero),
     TEST_c_c (ctanh, minus_infty, -0x1p127, -1.0, minus_zero),
     TEST_c_c (ctanh, minus_infty, -0x1.11p127, -1.0, 0.0),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_c_c (ctanh, minus_infty, -0x1p1023, -1.0, 0.0),
     TEST_c_c (ctanh, minus_infty, -0x1.5p1023, -1.0, minus_zero),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+#if MAX_EXP >= 16384
     TEST_c_c (ctanh, minus_infty, -0x1p16383L, -1.0, minus_zero),
     TEST_c_c (ctanh, minus_infty, -0x1.2p16383L, -1.0, 0.0),
 #endif
@@ -7225,14 +7225,14 @@ static const struct test_f_f_data floor_test_data[] =
     TEST_f_f (floor, -0x1p114, -0x1p114, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (floor, -max_value, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (floor, 4503599627370495.5L, 4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370496.25L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370496.5L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370496.75L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370497.5L, 4503599627370497.0L, ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (floor, 4503599627370494.5000000000001L, 4503599627370494.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370495.5000000000001L, 4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 4503599627370496.5000000000001L, 4503599627370496.0L, ERRNO_UNCHANGED),
@@ -7243,7 +7243,7 @@ static const struct test_f_f_data floor_test_data[] =
     TEST_f_f (floor, -4503599627370496.5L, -4503599627370497.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -4503599627370496.75L, -4503599627370497.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -4503599627370497.5L, -4503599627370498.0L, ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (floor, -4503599627370494.5000000000001L, -4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -4503599627370495.5000000000001L, -4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -4503599627370496.5000000000001L, -4503599627370497.0L, ERRNO_UNCHANGED),
@@ -7255,7 +7255,7 @@ static const struct test_f_f_data floor_test_data[] =
     TEST_f_f (floor, 9007199254740992.75L, 9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 9007199254740993.5L, 9007199254740993.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (floor, 9007199254740991.0000000000001L, 9007199254740991.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 9007199254740992.0000000000001L, 9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, 9007199254740993.0000000000001L, 9007199254740993.0L, ERRNO_UNCHANGED),
@@ -7270,7 +7270,7 @@ static const struct test_f_f_data floor_test_data[] =
     TEST_f_f (floor, -9007199254740992.75L, -9007199254740993.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -9007199254740993.5L, -9007199254740994.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (floor, -9007199254740991.0000000000001L, -9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -9007199254740992.0000000000001L, -9007199254740993.0L, ERRNO_UNCHANGED),
     TEST_f_f (floor, -9007199254740993.0000000000001L, -9007199254740994.0L, ERRNO_UNCHANGED),
@@ -7667,7 +7667,7 @@ static const struct test_ff_f_data fmod_test_data[] =
     TEST_ff_f (fmod, -0x1p127L, -0x3p-148L, -0x1p-147L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1p127L, 0x3p-126L, -0x1p-125L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1p127L, -0x3p-126L, -0x1p-125L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (fmod, 0x1p1023L, 0x3p-1074L, 0x1p-1073L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p1023L, -0x3p-1074L, 0x1p-1073L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p1023L, 0x3p-1073L, 0x1p-1073L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7681,7 +7681,7 @@ static const struct test_ff_f_data fmod_test_data[] =
     TEST_ff_f (fmod, -0x1p1023L, 0x3p-1022L, -0x1p-1021L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1p1023L, -0x3p-1022L, -0x1p-1021L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_ff_f (fmod, 0x1p16383L, 0x3p-16445L, 0x1p-16445L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p16383L, -0x3p-16445L, 0x1p-16445L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p16383L, 0x3p-16444L, 0x1p-16443L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7694,7 +7694,7 @@ static const struct test_ff_f_data fmod_test_data[] =
     TEST_ff_f (fmod, -0x1p16383L, -0x3p-16444L, -0x1p-16443L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1p16383L, 0x3p-16382L, -0x1p-16381L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1p16383L, -0x3p-16382L, -0x1p-16381L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (fmod, 0x1p16383L, 0x3p-16494L, 0x1p-16493L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p16383L, -0x3p-16494L, 0x1p-16493L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1p16383L, 0x3p-16493L, 0x1p-16493L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7707,13 +7707,13 @@ static const struct test_ff_f_data fmod_test_data[] =
 #endif
 
     TEST_ff_f (fmod, 0x0.fffffep-126L, 0x1p-149L, plus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (fmod, 0x0.fffffffffffffp-1022L, 0x1p-1074L, plus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_ff_f (fmod, 0x0.fffffffffffffffep-16382L, 0x1p-16445L, plus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 56
+#if MANT_DIG >= 56
     TEST_ff_f (fmod, -0x1.00000000000004p+0L, 0x1.fffffffffffff8p-1L, -0x1p-53L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, 0x1.fffffffffffffap-1L, 0x1.fffffffffffff8p-1L, 0x1p-56L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (fmod, -0x1.fffffffffffffap-1L, 0x1.fffffffffffff8p-1L, -0x1p-56L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7779,7 +7779,7 @@ static const struct test_f_f1_data frexp_test_data[] =
     TEST_fI_f1 (frexp, 0x1p-127L, 0.5L, -126, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 0x1p-149L, 0.5L, -148, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p-149L, -0.5L, -148, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_fI_f1 (frexp, 0x1p1023L, 0.5L, 1024, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p1023L, -0.5L, 1024, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 0x1p-1022L, 0.5L, -1021, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7787,20 +7787,20 @@ static const struct test_f_f1_data frexp_test_data[] =
     TEST_fI_f1 (frexp, 0x1p-1074L, 0.5L, -1073, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p-1074L, -0.5L, -1073, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+#if MIN_EXP <= -16381
     TEST_fI_f1 (frexp, 0x1p16383L, 0.5L, 16384, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p16383L, -0.5L, 16384, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 0x1p-16382L, 0.5L, -16381, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 0x1p-16383L, 0.5L, -16382, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 0x1p-16445L, 0.5L, -16444, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p-16445L, -0.5L, -16444, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_fI_f1 (frexp, 0x1p-16494L, 0.5L, -16493, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, -0x1p-16494L, -0.5L, -16493, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
 
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_fI_f1 (frexp, 1.0L-0x1p-106L, 1.0L-0x1p-106L, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 1.0L, 0.5L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_fI_f1 (frexp, 1.0L+0x1p-105L, 0.5L+0x1p-106L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -7931,7 +7931,7 @@ static const struct test_f_i_data ilogb_test_data[] =
     TEST_f_i (ilogb, 0.5, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED);
     TEST_f_i (ilogb, -0.5, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED);
 
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 57
+#if MANT_DIG >= 57
     TEST_f_i (ilogb, 0x1.ffffffffffffffp1L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, -0x1.ffffffffffffffp1L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -8457,7 +8457,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, -0x1p64, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lrint, -0x1p65, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lrint, 0x7fffff80p0, 0x7fffff80LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lrint, 0x7fffffffp0, 0x7fffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, 0x7fffffff.4p0, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8472,27 +8472,27 @@ static const struct test_f_l_data lrint_test_data[] =
 # endif
 #endif
 #if LONG_MAX > 0x7fffffff
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+# if MANT_DIG >= 64
     TEST_f_l (lrint, 0x7fffffff.7fffffff8p0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_l (lrint, 0x7fffffff.7fffffffffffffffffep0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_l (lrint, 0x7fffffff.7fffffffffffffffffffcp0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #else
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+# if MANT_DIG >= 64
     TEST_f_l (lrint, 0x7fffffff.7fffffff8p0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_l (lrint, 0x7fffffff.7fffffffffffffffffep0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_l (lrint, 0x7fffffff.7fffffffffffffffffffcp0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, -0x80000000.4p0, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -0x80000000.7ffff8p0, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8513,23 +8513,23 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, -0x80000100p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
 #if LONG_MAX > 0x7fffffff
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+# if MANT_DIG >= 64
     TEST_f_l (lrint, -0x80000000.7fffffffp0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_l (lrint, -0x80000000.7fffffffffffffffffcp0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_l (lrint, -0x80000000.7fffffffffffffffffff8p0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #else
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+# if MANT_DIG >= 64
     TEST_f_l (lrint, -0x80000000.7fffffffp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_l (lrint, -0x80000000.7fffffffffffffffffcp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
-# if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_l (lrint, -0x80000000.7fffffffffffffffffff8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
@@ -8538,14 +8538,14 @@ static const struct test_f_l_data lrint_test_data[] =
 #else
     TEST_f_l (lrint, 0x7fffff8000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, 0x7ffffffffffffc00p0, 0x7ffffffffffffc00LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # else
     TEST_f_l (lrint, 0x7ffffffffffffc00p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, 0x7fffffffffffffffp0L, 0x7fffffffffffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 0x7fffffffffffffff.8p0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
@@ -8553,7 +8553,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, 0x7fffffffffffffffp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lrint, 0x7fffffffffffffff.8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if LDBL_MANT_DIG > 64
+# if MANT_DIG > 64
 #  if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, 0x7fffffffffffffff.4p0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lrint, 0x7fffffffffffffff.cp0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
@@ -8563,25 +8563,25 @@ static const struct test_f_l_data lrint_test_data[] =
 #  endif
 # endif
 # if LONG_MAX > 0x7fffffff
-#  if LDBL_MANT_DIG >= 106
+#  if MANT_DIG >= 106
     TEST_f_l (lrint, 0x7fffffffffffffff.7fffffffffep0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
-#  if LDBL_MANT_DIG >= 113
+#  if MANT_DIG >= 113
     TEST_f_l (lrint, 0x7fffffffffffffff.7fffffffffffcp0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
 # else
-#  if LDBL_MANT_DIG >= 106
+#  if MANT_DIG >= 106
     TEST_f_l (lrint, 0x7fffffffffffffff.7fffffffffep0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
-#  if LDBL_MANT_DIG >= 113
+#  if MANT_DIG >= 113
     TEST_f_l (lrint, 0x7fffffffffffffff.7fffffffffffcp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_l (lrint, -0x8000000000000001p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, -0x8000000000000000.4p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -0x8000000000000000.7fffffffffcp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8595,10 +8595,10 @@ static const struct test_f_l_data lrint_test_data[] =
 # endif
 #endif
     TEST_f_l (lrint, -0x8000010000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lrint, -0x8000000000000800p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lrint, -0x8000000000000000.7fffffffffff8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # else
@@ -8624,10 +8624,10 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388601, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -8388600.3L, -8388601, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071931, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741825, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LONG_MAX > 281474976710656 && defined TEST_LDOUBLE
+# if LONG_MAX > 281474976710656 && MANT_DIG >= 64
     TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
@@ -8656,7 +8656,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     /* 0x100000000000000 */
     TEST_f_l (lrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# ifdef TEST_LDOUBLE
+# if MANT_DIG >= 64
     /* The input can only be represented in long double.  */
     TEST_f_l (lrint, 4503599627370495.5L, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8670,7 +8670,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#  if LDBL_MANT_DIG > 100
+#  if MANT_DIG > 100
     TEST_f_l (lrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8698,7 +8698,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#  if LDBL_MANT_DIG > 100
+#  if MANT_DIG > 100
     TEST_f_l (lrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8726,7 +8726,7 @@ static const struct test_f_l_data lrint_test_data[] =
     TEST_f_l (lrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927938LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#  if LDBL_MANT_DIG > 100
+#  if MANT_DIG > 100
     TEST_f_l (lrint, 9223372036854775805.5L, 9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8775,23 +8775,23 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, -0x1p64, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llrint, -0x1p65, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llrint, 0x7fffff80p0, 0x7fffff80LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llrint, 0x7fffffffp0, 0x7fffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 0x7fffffff.4p0, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 0x7fffffff.7ffffcp0, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 0x7fffffff.8p0, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 0x7fffffff.cp0, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_L (llrint, 0x7fffffff.7fffffff8p0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llrint, 0x7fffffff.7fffffffffffffffffep0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llrint, 0x7fffffff.7fffffffffffffffffffcp0L, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llrint, -0x80000000.4p0, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -0x80000000.7ffff8p0, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -0x80000000.8p0, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8799,47 +8799,47 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, -0x80000001p0, -0x80000001LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llrint, -0x80000100p0, -0x80000100LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_L (llrint, -0x80000000.7fffffffp0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llrint, -0x80000000.7fffffffffffffffffcp0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llrint, -0x80000000.7fffffffffffffffffff8p0L, -0x80000001LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -0x80000000LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llrint, 0x7fffff8000000000p0, 0x7fffff8000000000LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llrint, 0x7ffffffffffffc00p0, 0x7ffffffffffffc00LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_L (llrint, 0x7fffffffffffffffp0L, 0x7fffffffffffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 0x7fffffffffffffff.8p0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-# if LDBL_MANT_DIG > 64
+# if MANT_DIG > 64
     TEST_f_L (llrint, 0x7fffffffffffffff.4p0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llrint, 0x7fffffffffffffff.cp0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_L (llrint, 0x7fffffffffffffff.7fffffffffep0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_L (llrint, 0x7fffffffffffffff.7fffffffffffcp0L, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 0x7fffffffffffffffLL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_L (llrint, -0x8000000000000001p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llrint, -0x8000000000000000.4p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -0x8000000000000000.7fffffffffcp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -0x8000000000000000.8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -0x8000000000000000.cp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llrint, -0x8000010000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llrint, -0x8000000000000800p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llrint, -0x8000000000000000.7fffffffffff8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED, LLONG_MIN, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8861,10 +8861,10 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 8388601, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -8388600.3L, -8388601, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -8388600, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071930, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1071931, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741824, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1073741825, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# ifdef TEST_LDOUBLE
+# if MANT_DIG >= 64
     TEST_f_L (llrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
@@ -8892,7 +8892,7 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     /* 0x100000000000000 */
     TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The input can only be represented in long double.  */
     TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8906,7 +8906,7 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8934,7 +8934,7 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740991LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740992LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740993LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9007199254740994LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -8962,7 +8962,7 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927938LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775806LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -9223372036854775805LL, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9111,7 +9111,7 @@ static const struct test_f_f_data logb_test_data[] =
     TEST_f_f (logb, 0x0.1p-127, -131, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x0.01p-127, -135, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x0.011p-127, -135, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (logb, 0x0.8p-1022, -1023, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x0.1p-1022, -1026, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x0.00111p-1022, -1034, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9119,12 +9119,12 @@ static const struct test_f_f_data logb_test_data[] =
     TEST_f_f (logb, 0x0.000011p-1022, -1042, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x0.0000000000001p-1022, -1074, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MIN_EXP - LDBL_MANT_DIG <= -16400
+#if MIN_EXP - MANT_DIG <= -16400
     TEST_f_f (logb, 0x1p-16400L, -16400, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 0x.00000000001p-16382L, -16426, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
 
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 57
+#if MANT_DIG >= 57
     TEST_f_f (logb, 0x1.ffffffffffffffp1L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, -0x1.ffffffffffffffp1L, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -9172,7 +9172,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, -0x1p64, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lround, -0x1p65, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_l (lround, 0x7fffff80p0, 0x7fffff80LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lround, 0x7fffffffp0, 0x7fffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_l (lround, 0x7fffffff.4p0, 0x7fffffffLL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 0x7fffffff.7ffffcp0, 0x7fffffffLL, ERRNO_UNCHANGED),
@@ -9184,16 +9184,16 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 0x7fffffff.cp0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_l (lround, 0x7fffffff.7fffffff8p0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_l (lround, 0x7fffffff.7fffffffffffffffffep0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_l (lround, 0x7fffffff.7fffffffffffffffffffcp0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lround, -0x80000000.4p0, -0x80000000LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, -0x80000000.7ffff8p0, -0x80000000LL, ERRNO_UNCHANGED),
 # if LONG_MAX > 0x7fffffff
@@ -9211,13 +9211,13 @@ static const struct test_f_l_data lround_test_data[] =
 #else
     TEST_f_l (lround, -0x80000100p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_l (lround, -0x80000000.7fffffffp0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_l (lround, -0x80000000.7fffffffffffffffffcp0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_l (lround, -0x80000000.7fffffffffffffffffff8p0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
 #if LONG_MAX > 0x7fffffff
@@ -9225,21 +9225,21 @@ static const struct test_f_l_data lround_test_data[] =
 #else
     TEST_f_l (lround, 0x7fffff8000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, 0x7ffffffffffffc00p0, 0x7ffffffffffffc00LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # else
     TEST_f_l (lround, 0x7ffffffffffffc00p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, 0x7fffffffffffffffp0L, 0x7fffffffffffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # else
     TEST_f_l (lround, 0x7fffffffffffffffp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
     TEST_f_l (lround, 0x7fffffffffffffff.8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-# if LDBL_MANT_DIG > 64
+# if MANT_DIG > 64
 #  if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, 0x7fffffffffffffff.4p0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
 #  else
@@ -9248,25 +9248,25 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 0x7fffffffffffffff.cp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
 # if LONG_MAX > 0x7fffffff
-#  if LDBL_MANT_DIG >= 106
+#  if MANT_DIG >= 106
     TEST_f_l (lround, 0x7fffffffffffffff.7fffffffffep0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
 #  endif
-#  if LDBL_MANT_DIG >= 113
+#  if MANT_DIG >= 113
     TEST_f_l (lround, 0x7fffffffffffffff.7fffffffffffcp0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
 #  endif
 # else
-#  if LDBL_MANT_DIG >= 106
+#  if MANT_DIG >= 106
     TEST_f_l (lround, 0x7fffffffffffffff.7fffffffffep0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
-#  if LDBL_MANT_DIG >= 113
+#  if MANT_DIG >= 113
     TEST_f_l (lround, 0x7fffffffffffffff.7fffffffffffcp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #  endif
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_l (lround, -0x8000000000000001p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, -0x8000000000000000.4p0L, LLONG_MIN, ERRNO_UNCHANGED),
     TEST_f_l (lround, -0x8000000000000000.7fffffffffcp0L, LLONG_MIN, ERRNO_UNCHANGED),
@@ -9278,10 +9278,10 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, -0x8000000000000000.cp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
     TEST_f_l (lround, -0x8000010000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lround, -0x8000000000000800p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, -0x8000000000000000.7fffffffffff8p0L, LLONG_MIN, ERRNO_UNCHANGED),
 # else
@@ -9307,7 +9307,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 1071930.0008, 1071930, ERRNO_UNCHANGED),
     TEST_f_l (lround, 2097152.5, 2097153, ERRNO_UNCHANGED),
     TEST_f_l (lround, -2097152.5, -2097153, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_l (lround, 1073741824.01, 1073741824, ERRNO_UNCHANGED),
 # if LONG_MAX > 0x7fffffff
     TEST_f_l (lround, 34359738368.5, 34359738369ll, ERRNO_UNCHANGED),
@@ -9344,7 +9344,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
 # if LONG_MAX > 0x7fffffff
     /* 0x100000000 */
     TEST_f_l (lround, 4294967295.5, 4294967296LL, ERRNO_UNCHANGED),
@@ -9390,7 +9390,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, -0x1.fffffep+23, -16777215, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
 #if LONG_MAX > 0x7fffffff
-# ifdef TEST_LDOUBLE
+# if MANT_DIG >= 64
     /* The input can only be represented in long double.  */
     TEST_f_l (lround, 4503599627370495.5L, 4503599627370496LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 4503599627370496.25L, 4503599627370496LL, ERRNO_UNCHANGED),
@@ -9398,7 +9398,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 4503599627370496.75L, 4503599627370497LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 4503599627370497.5L, 4503599627370498LL, ERRNO_UNCHANGED),
 
-#  if LDBL_MANT_DIG > 100
+#  if MANT_DIG > 100
     TEST_f_l (lround, 4503599627370495.4999999999999L, 4503599627370495LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 4503599627370496.4999999999999L, 4503599627370496LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 4503599627370497.4999999999999L, 4503599627370497LL, ERRNO_UNCHANGED),
@@ -9426,7 +9426,7 @@ static const struct test_f_l_data lround_test_data[] =
     TEST_f_l (lround, 9007199254740992.75L, 9007199254740993LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 9007199254740993.5L, 9007199254740994LL, ERRNO_UNCHANGED),
 
-#  if LDBL_MANT_DIG > 100
+#  if MANT_DIG > 100
     TEST_f_l (lround, 9007199254740991.4999999999999L, 9007199254740991LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 9007199254740992.4999999999999L, 9007199254740992LL, ERRNO_UNCHANGED),
     TEST_f_l (lround, 9007199254740993.4999999999999L, 9007199254740993LL, ERRNO_UNCHANGED),
@@ -9501,23 +9501,23 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, -0x1p64, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llround, -0x1p65, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llround, 0x7fffff80p0, 0x7fffff80LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llround, 0x7fffffffp0, 0x7fffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffff.4p0, 0x7fffffffLL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffff.7ffffcp0, 0x7fffffffLL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffff.8p0, 0x80000000LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffff.cp0, 0x80000000LL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_L (llround, 0x7fffffff.7fffffff8p0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llround, 0x7fffffff.7fffffffffffffffffep0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llround, 0x7fffffff.7fffffffffffffffffffcp0L, 0x7fffffffLL, ERRNO_UNCHANGED),
 #endif
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llround, -0x80000000.4p0, -0x80000000LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, -0x80000000.7ffff8p0, -0x80000000LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, -0x80000000.8p0, -0x80000001LL, ERRNO_UNCHANGED),
@@ -9525,47 +9525,47 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, -0x80000001p0, -0x80000001LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llround, -0x80000100p0, -0x80000100LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_f_L (llround, -0x80000000.7fffffffp0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llround, -0x80000000.7fffffffffffffffffcp0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llround, -0x80000000.7fffffffffffffffffff8p0L, -0x80000000LL, ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llround, 0x7fffff8000000000p0, 0x7fffff8000000000LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llround, 0x7ffffffffffffc00p0, 0x7ffffffffffffc00LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_L (llround, 0x7fffffffffffffffp0L, 0x7fffffffffffffffLL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffffffffffff.8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-# if LDBL_MANT_DIG > 64
+# if MANT_DIG > 64
     TEST_f_L (llround, 0x7fffffffffffffff.4p0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 0x7fffffffffffffff.cp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 # endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_L (llround, 0x7fffffffffffffff.7fffffffffep0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_f_L (llround, 0x7fffffffffffffff.7fffffffffffcp0L, 0x7fffffffffffffffLL, ERRNO_UNCHANGED),
 # endif
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     TEST_f_L (llround, -0x8000000000000001p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+#if MANT_DIG >= 106
     TEST_f_L (llround, -0x8000000000000000.4p0L, LLONG_MIN, ERRNO_UNCHANGED),
     TEST_f_L (llround, -0x8000000000000000.7fffffffffcp0L, LLONG_MIN, ERRNO_UNCHANGED),
     TEST_f_L (llround, -0x8000000000000000.8p0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
     TEST_f_L (llround, -0x8000000000000000.cp0L, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
     TEST_f_L (llround, -0x8000010000000000p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llround, -0x8000000000000800p0, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+#if MANT_DIG >= 113
     TEST_f_L (llround, -0x8000000000000000.7fffffffffff8p0L, LLONG_MIN, ERRNO_UNCHANGED),
 #endif
     TEST_f_L (llround, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9587,7 +9587,7 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, 1071930.0008, 1071930, ERRNO_UNCHANGED),
     TEST_f_L (llround, 2097152.5, 2097153, ERRNO_UNCHANGED),
     TEST_f_L (llround, -2097152.5, -2097153, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_L (llround, 1073741824.01, 1073741824, ERRNO_UNCHANGED),
     TEST_f_L (llround, 34359738368.5, 34359738369ll, ERRNO_UNCHANGED),
     TEST_f_L (llround, -34359738368.5, -34359738369ll, ERRNO_UNCHANGED),
@@ -9620,7 +9620,7 @@ static const struct test_f_L_data llround_test_data[] =
     /* 0x100000000000000 */
     TEST_f_L (llround, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     /* 0x100000000 */
     TEST_f_L (llround, 4294967295.5, 4294967296LL, ERRNO_UNCHANGED),
     /* 0x200000000 */
@@ -9661,7 +9661,7 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, 0x1.fffffep+23, 16777215, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_L (llround, -0x1.fffffep+23, -16777215, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The input can only be represented in long double.  */
     TEST_f_L (llround, 4503599627370495.5L, 4503599627370496LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 4503599627370496.25L, 4503599627370496LL, ERRNO_UNCHANGED),
@@ -9669,7 +9669,7 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, 4503599627370496.75L, 4503599627370497LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 4503599627370497.5L, 4503599627370498LL, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_L (llround, 4503599627370495.4999999999999L, 4503599627370495LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 4503599627370496.4999999999999L, 4503599627370496LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 4503599627370497.4999999999999L, 4503599627370497LL, ERRNO_UNCHANGED),
@@ -9697,7 +9697,7 @@ static const struct test_f_L_data llround_test_data[] =
     TEST_f_L (llround, 9007199254740992.75L, 9007199254740993LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 9007199254740993.5L, 9007199254740994LL, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_L (llround, 9007199254740991.4999999999999L, 9007199254740991LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 9007199254740992.4999999999999L, 9007199254740992LL, ERRNO_UNCHANGED),
     TEST_f_L (llround, 9007199254740993.4999999999999L, 9007199254740993LL, ERRNO_UNCHANGED),
@@ -9824,7 +9824,7 @@ static const struct test_f_f_data nearbyint_test_data[] =
     TEST_f_f (nearbyint, -2492472.75, -2492473.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492473.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492472.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492472.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -2886220.75, -2886221.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886221.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886220.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886220.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -3058792.75, -3058793.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058793.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058792.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058792.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (nearbyint, 70368744177664.75, 70368744177664.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177665.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177664.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177665.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 140737488355328.75, 140737488355328.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355329.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355328.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355329.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 281474976710656.75, 281474976710656.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9836,14 +9836,14 @@ static const struct test_f_f_data nearbyint_test_data[] =
     TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421313.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421312.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421312.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842625.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842624.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842624.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (nearbyint, 4503599627370495.5L, 4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 4503599627370496.25L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 4503599627370496.5L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 4503599627370496.75L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 4503599627370497.5L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (nearbyint, 1024.5000000000001L, 1024.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1024.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 1025.5000000000001L, 1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1026.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1026.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -1024.5000000000001L, -1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1025.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1024.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1024.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9857,7 +9857,7 @@ static const struct test_f_f_data nearbyint_test_data[] =
     TEST_f_f (nearbyint, -4503599627370496.5L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -4503599627370496.75L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -4503599627370497.5L, -4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (nearbyint, -4503599627370494.5000000000001L, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370494.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370494.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -4503599627370495.5000000000001L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -4503599627370496.5000000000001L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9901,7 +9901,7 @@ static const struct test_f_f_data nearbyint_test_data[] =
     TEST_f_f (nearbyint, -72057594037927936.75L, -72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -72057594037927937.5L, -72057594037927938.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927938.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (nearbyint, 10141204801825835211973625643007.5L, 10141204801825835211973625643007.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643007.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643009.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643009.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -9914,13 +9914,13 @@ static const struct test_f_f_data nearbyint_test_data[] =
        IBM long double.  */
     TEST_f_f (nearbyint,  34503599627370498.515625L, 34503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -34503599627370498.515625L, -34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_f (nearbyint,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640625.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -1192568192774434123539907640624.484375L, -1192568192774434123539907640625.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (nearbyint, -8.98847e+307, -8.98847e+307, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (nearbyint, -4.45015e-308, -1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -9971,11 +9971,11 @@ static const struct test_ff_f_data nextafter_test_data[] =
     TEST_ff_f (nextafter, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (nextafter, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     // XXX Enable once gcc is fixed.
     //TEST_ff_f (nextafter, 0x0.00000040000000000000p-16385L, -0.1L, 0x0.0000003ffffffff00000p-16385L),
 #endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 106
+#if MANT_DIG == 106
     TEST_ff_f (nextafter, 1.0L, -10.0L, 1.0L-0x1p-106L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nextafter, 1.0L, 10.0L, 1.0L+0x1p-105L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nextafter, 1.0L-0x1p-106L, 10.0L, 1.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10034,7 +10034,7 @@ static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
     TEST_ff_f (nexttoward, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (nexttoward, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
 
-#ifdef TEST_FLOAT
+#if TEST_COND_binary32
     TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10067,7 +10067,7 @@ static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
     TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
-#ifdef TEST_DOUBLE
+#if TEST_COND_binary64
     TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10240,17 +10240,15 @@ static const struct test_ff_f_data pow_test_data[] =
     TEST_ff_f (pow, 0, -1, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, 0, -11, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, 0, -0xffffff, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, 0, -0x1.fffffffffffffp+52L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, 0, -0x1.fffffffffffffffep+63L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffff8p+105L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffffffp+112L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 # endif
 #endif
@@ -10258,20 +10256,18 @@ static const struct test_ff_f_data pow_test_data[] =
     TEST_ff_f (pow, minus_zero, -11L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0xffffff, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0x1fffffe, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+52L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+53L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+63L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+64L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
     TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
 # endif
@@ -10310,17 +10306,15 @@ static const struct test_ff_f_data pow_test_data[] =
     /* pow (+inf, y) == +inf for y > 0.  */
     TEST_ff_f (pow, plus_infty, 2, plus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, plus_infty, 0xffffff, plus_infty, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffp+52L, plus_infty, ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffffep+63L, plus_infty, ERRNO_UNCHANGED),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, plus_infty, ERRNO_UNCHANGED),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, plus_infty, ERRNO_UNCHANGED),
 # endif
 #endif
@@ -10331,17 +10325,15 @@ static const struct test_ff_f_data pow_test_data[] =
     /* pow (+inf, y) == +0 for y < 0.  */
     TEST_ff_f (pow, plus_infty, -1, 0.0, ERRNO_UNCHANGED),
     TEST_ff_f (pow, plus_infty, -0xffffff, 0.0, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffp+52L, 0.0, ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffffep+63L, 0.0, ERRNO_UNCHANGED),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, 0.0, ERRNO_UNCHANGED),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, 0.0, ERRNO_UNCHANGED),
 # endif
 #endif
@@ -10353,20 +10345,18 @@ static const struct test_ff_f_data pow_test_data[] =
     TEST_ff_f (pow, minus_infty, 27, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0xffffff, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0x1fffffe, plus_infty, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+52L, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+53L, plus_infty, ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+63L, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+64L, plus_infty, ERRNO_UNCHANGED),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, ERRNO_UNCHANGED),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, ERRNO_UNCHANGED),
 # endif
@@ -10383,20 +10373,18 @@ static const struct test_ff_f_data pow_test_data[] =
     TEST_ff_f (pow, minus_infty, -3, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0xffffff, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0x1fffffe, plus_zero, ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+52L, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+53L, plus_zero, ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
-# if LDBL_MANT_DIG >= 64
+#if MANT_DIG >= 64
     TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+63L, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+64L, plus_zero, ERRNO_UNCHANGED),
-# endif
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+106L, plus_zero, ERRNO_UNCHANGED),
 # endif
-# if LDBL_MANT_DIG >= 113
+# if MANT_DIG >= 113
     TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, minus_zero, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero, ERRNO_UNCHANGED),
 # endif
@@ -10478,7 +10466,7 @@ static const struct test_ff_f_data remainder_test_data[] =
     TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 56
+#if MANT_DIG >= 56
     TEST_ff_f (remainder, -0x1.80000000000002p1L, 2.0, 0x1.fffffffffffff8p-1L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (remainder, 0x0.ffffffffffffffp0L, -0x1.00000000000001p0L, -0x1p-55L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -10617,7 +10605,7 @@ static const struct test_ffI_f1_data remquo_test_data[] =
 
     TEST_ffI_f1 (remquo, 5, 2, 1, 2, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ffI_f1 (remquo, 3, 2, -1, 2, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 56
+#if MANT_DIG >= 56
     TEST_ffI_f1 (remquo, -0x1.80000000000002p1L, 2.0, 0x1.fffffffffffff8p-1L, -2, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ffI_f1 (remquo, 0x0.ffffffffffffffp0L, -0x1.00000000000001p0L, -0x1p-55L, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -10745,7 +10733,7 @@ static const struct test_f_f_data rint_test_data[] =
     TEST_f_f (rint, -2492472.75, -2492473.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492473.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492472.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2492472.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -2886220.75, -2886221.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886221.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886220.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -2886220.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -3058792.75, -3058793.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058793.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058792.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -3058792.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (rint, 70368744177664.75, 70368744177664.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177665.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177664.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 70368744177665.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 140737488355328.75, 140737488355328.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355329.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355328.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 140737488355329.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 281474976710656.75, 281474976710656.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710656.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 281474976710657.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10757,14 +10745,14 @@ static const struct test_f_f_data rint_test_data[] =
     TEST_f_f (rint, -562949953421312.75, -562949953421313.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421313.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421312.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -562949953421312.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842625.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842624.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1125899906842624.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 4503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (rint, 1024.5000000000001L, 1024.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1024.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 1025.5000000000001L, 1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1026.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1026.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -1024.5000000000001L, -1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1025.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1024.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1024.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10778,7 +10766,7 @@ static const struct test_f_f_data rint_test_data[] =
     TEST_f_f (rint, -4503599627370496.5L, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370494.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370494.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370495.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370497.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -4503599627370496.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10822,7 +10810,7 @@ static const struct test_f_f_data rint_test_data[] =
     TEST_f_f (rint, -72057594037927936.75L, -72057594037927937.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927936.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -72057594037927937.5L, -72057594037927938.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927938.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -72057594037927937.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (rint, 10141204801825835211973625643007.5L, 10141204801825835211973625643007.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643007.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10835,13 +10823,13 @@ static const struct test_f_f_data rint_test_data[] =
        IBM long double.  */
     TEST_f_f (rint,  34503599627370498.515625L, 34503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370499.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 34503599627370499.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -34503599627370498.515625L, -34503599627370499.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370499.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -34503599627370498.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_f (rint,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, 1192568192774434123539907640625.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -1192568192774434123539907640624.484375L, -1192568192774434123539907640625.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED, -1192568192774434123539907640624.0L, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (rint, -8.98847e+307, -8.98847e+307, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (rint, -4.45015e-308, -1.0, INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, INEXACT_EXCEPTION|ERRNO_UNCHANGED, minus_zero, INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
@@ -10922,7 +10910,7 @@ static const struct test_f_f_data round_test_data[] =
     TEST_f_f (round, 2097152.5, 2097153, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -2097152.5, -2097153, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-#ifndef TEST_FLOAT
+#if !TEST_COND_binary32
     TEST_f_f (round, 0xffffffffffff.0p0L, 0xffffffffffff.0p0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 0xffffffffffff.4p0L, 0xffffffffffff.0p0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 0xffffffffffff.8p0L, 0x1000000000000.0p0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10933,14 +10921,14 @@ static const struct test_f_f_data round_test_data[] =
     TEST_f_f (round, -0xffffffffffff.cp0L, -0x1000000000000.0p0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 #endif
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (round, 4503599627370495.5L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370496.25L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370496.5L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370496.75L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370497.5L, 4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (round, 4503599627370494.5000000000001L, 4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370495.5000000000001L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 4503599627370496.5000000000001L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10951,7 +10939,7 @@ static const struct test_f_f_data round_test_data[] =
     TEST_f_f (round, -4503599627370496.5L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -4503599627370496.75L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -4503599627370497.5L, -4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (round, -4503599627370494.5000000000001L, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -4503599627370495.5000000000001L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -4503599627370496.5000000000001L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -10969,7 +10957,7 @@ static const struct test_f_f_data round_test_data[] =
     TEST_f_f (round, -9007199254740992.75L, -9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -9007199254740993.5L, -9007199254740994.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (round, 9007199254740991.0000000000001L, 9007199254740991.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 9007199254740992.0000000000001L, 9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, 9007199254740993.0000000000001L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -11001,7 +10989,7 @@ static const struct test_f_f_data round_test_data[] =
        the precision is determined by second long double for IBM long double.  */
     TEST_f_f (round,  34503599627370498.515625L, 34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -34503599627370498.515625L, -34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_f (round,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (round, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
@@ -11571,7 +11559,7 @@ static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, 4294967296.625L, 4294967296.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -4294967296.625L, -4294967296.0L, ERRNO_UNCHANGED),
 
-#ifdef TEST_LDOUBLE
+#if MANT_DIG >= 64
     /* The result can only be represented in long double.  */
     TEST_f_f (trunc, 4503599627370495.5L, 4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 4503599627370496.25L, 4503599627370496.0L, ERRNO_UNCHANGED),
@@ -11579,7 +11567,7 @@ static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, 4503599627370496.75L, 4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 4503599627370497.5L, 4503599627370497.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (trunc, 4503599627370494.5000000000001L, 4503599627370494.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 4503599627370495.5000000000001L, 4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 4503599627370496.5000000000001L, 4503599627370496.0L, ERRNO_UNCHANGED),
@@ -11591,7 +11579,7 @@ static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, -4503599627370496.75L, -4503599627370496.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -4503599627370497.5L, -4503599627370497.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (trunc, -4503599627370494.5000000000001L, -4503599627370494.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -4503599627370495.5000000000001L, -4503599627370495.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -4503599627370496.5000000000001L, -4503599627370496.0L, ERRNO_UNCHANGED),
@@ -11603,7 +11591,7 @@ static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, 9007199254740992.75L, 9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 9007199254740993.5L, 9007199254740993.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (trunc, 9007199254740991.0000000000001L, 9007199254740991.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 9007199254740992.0000000000001L, 9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, 9007199254740993.0000000000001L, 9007199254740993.0L, ERRNO_UNCHANGED),
@@ -11618,7 +11606,7 @@ static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, -9007199254740992.75L, -9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -9007199254740993.5L, -9007199254740993.0L, ERRNO_UNCHANGED),
 
-# if LDBL_MANT_DIG > 100
+# if MANT_DIG > 100
     TEST_f_f (trunc, -9007199254740991.0000000000001L, -9007199254740991.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -9007199254740992.0000000000001L, -9007199254740992.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -9007199254740993.0000000000001L, -9007199254740993.0L, ERRNO_UNCHANGED),
@@ -11643,7 +11631,7 @@ static const struct test_f_f_data trunc_test_data[] =
        the precision is determined by second long double for IBM long double.  */
     TEST_f_f (trunc,  34503599627370498.515625L, 34503599627370498.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -34503599627370498.515625L, -34503599627370498.0L, ERRNO_UNCHANGED),
-# if LDBL_MANT_DIG >= 106
+# if MANT_DIG >= 106
     TEST_f_f (trunc,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L, ERRNO_UNCHANGED),
     TEST_f_f (trunc, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L, ERRNO_UNCHANGED),
 # endif
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (5 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 02/11] Refactor type specific macros using regexes Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-27 13:32   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 03/11] Refactor M_ macros defined " Paul E. Murphy
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

This is useful in situations where the long double type is
less precise than the type under test.  This adds a new
wrapper macro LITM(x) to each type to append the proper
suffix onto macro constants found in math.h.

	* libm-test.inc: Replace usage of M_PI2l with
	(lit_pi_2_d): New macro.

	* math/test-double.h (LITM): New macro.
	* math/test-float.h (LITM): Likewise.
	* math/test-ldouble.h (LITM): Likewise.
---
 math/libm-test.inc  | 316 ++++++++++++++++++++++++++--------------------------
 math/test-double.h  |   1 +
 math/test-float.h   |   2 +
 math/test-ldouble.h |   1 +
 4 files changed, 163 insertions(+), 157 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 4cd1db6..a23b812 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -321,6 +321,8 @@ struct ulp_data
 #define lit_pi_4_ln10_m_d	LIT (0.341094088460460336871445906357838943)
 /* pi / ln(10) */
 #define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
+/* pi / 2 */
+#define lit_pi_2_d		LITM (M_PI_2)
 
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
@@ -1900,8 +1902,8 @@ asinh_test (void)
 
 static const struct test_f_f_data atan_test_data[] =
   {
-    TEST_f_f (atan, plus_infty, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_f_f (atan, minus_infty, -M_PI_2l, ERRNO_UNCHANGED),
+    TEST_f_f (atan, plus_infty, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_f_f (atan, minus_infty, -lit_pi_2_d, ERRNO_UNCHANGED),
     TEST_f_f (atan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (atan, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (atan, snan_value, qnan_value, INVALID_EXCEPTION),
@@ -1959,28 +1961,28 @@ static const struct test_ff_f_data atan2_test_data[] =
     TEST_ff_f (atan2, -max_value, plus_infty, minus_zero, ERRNO_UNCHANGED),
 
     /* atan2(+inf, x) == pi/2 for finite x.  */
-    TEST_ff_f (atan2, plus_infty, 1, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, plus_zero, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, min_value, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, min_subnorm_value, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, max_value, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, -1, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, minus_zero, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, -min_value, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, -min_subnorm_value, M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, -max_value, M_PI_2l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, 1, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, plus_zero, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, min_value, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, min_subnorm_value, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, max_value, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, -1, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, minus_zero, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, -min_value, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, -min_subnorm_value, lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, -max_value, lit_pi_2_d, ERRNO_UNCHANGED),
 
     /* atan2(-inf, x) == -pi/2 for finite x.  */
-    TEST_ff_f (atan2, minus_infty, 1, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, plus_zero, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, min_value, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, min_subnorm_value, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, max_value, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, -1, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, minus_zero, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, -min_value, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, -min_subnorm_value, -M_PI_2l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, -max_value, -M_PI_2l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, 1, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, plus_zero, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, min_value, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, min_subnorm_value, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, max_value, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, -1, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, minus_zero, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, -min_value, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, -min_subnorm_value, -lit_pi_2_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, -max_value, -lit_pi_2_d, ERRNO_UNCHANGED),
 
     /* atan2 (y,-inf) == +pi for finite y > 0 or +0.  */
     TEST_ff_f (atan2, 1, minus_infty, M_PIl, ERRNO_UNCHANGED),
@@ -2086,10 +2088,10 @@ cabs_test (void)
 
 static const struct test_c_c_data cacos_test_data[] =
   {
-    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),
-    TEST_c_c (cacos, 0, minus_zero, M_PI_2l, 0.0),
+    TEST_c_c (cacos, 0, 0, lit_pi_2_d, minus_zero),
+    TEST_c_c (cacos, minus_zero, 0, lit_pi_2_d, minus_zero),
+    TEST_c_c (cacos, minus_zero, minus_zero, lit_pi_2_d, 0.0),
+    TEST_c_c (cacos, 0, minus_zero, lit_pi_2_d, 0.0),
 
     TEST_c_c (cacos, minus_infty, plus_infty, lit_pi_3_m_4_d, minus_infty),
     TEST_c_c (cacos, minus_infty, minus_infty, lit_pi_3_m_4_d, plus_infty),
@@ -2097,12 +2099,12 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, plus_infty, plus_infty, M_PI_4l, minus_infty),
     TEST_c_c (cacos, plus_infty, minus_infty, M_PI_4l, plus_infty),
 
-    TEST_c_c (cacos, -10.0, plus_infty, M_PI_2l, minus_infty),
-    TEST_c_c (cacos, -10.0, minus_infty, M_PI_2l, plus_infty),
-    TEST_c_c (cacos, 0, plus_infty, M_PI_2l, minus_infty),
-    TEST_c_c (cacos, 0, minus_infty, M_PI_2l, plus_infty),
-    TEST_c_c (cacos, 0.1L, plus_infty, M_PI_2l, minus_infty),
-    TEST_c_c (cacos, 0.1L, minus_infty, M_PI_2l, plus_infty),
+    TEST_c_c (cacos, -10.0, plus_infty, lit_pi_2_d, minus_infty),
+    TEST_c_c (cacos, -10.0, minus_infty, lit_pi_2_d, plus_infty),
+    TEST_c_c (cacos, 0, plus_infty, lit_pi_2_d, minus_infty),
+    TEST_c_c (cacos, 0, minus_infty, lit_pi_2_d, plus_infty),
+    TEST_c_c (cacos, 0.1L, plus_infty, lit_pi_2_d, minus_infty),
+    TEST_c_c (cacos, 0.1L, minus_infty, lit_pi_2_d, plus_infty),
 
     TEST_c_c (cacos, minus_infty, 0, M_PIl, minus_infty),
     TEST_c_c (cacos, minus_infty, minus_zero, M_PIl, plus_infty),
@@ -2117,8 +2119,8 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, plus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN),
     TEST_c_c (cacos, minus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN),
 
-    TEST_c_c (cacos, 0, qnan_value, M_PI_2l, qnan_value),
-    TEST_c_c (cacos, minus_zero, qnan_value, M_PI_2l, qnan_value),
+    TEST_c_c (cacos, 0, qnan_value, lit_pi_2_d, qnan_value),
+    TEST_c_c (cacos, minus_zero, qnan_value, lit_pi_2_d, qnan_value),
 
     TEST_c_c (cacos, qnan_value, plus_infty, qnan_value, minus_infty),
     TEST_c_c (cacos, qnan_value, minus_infty, qnan_value, plus_infty),
@@ -2131,18 +2133,18 @@ static const struct test_c_c_data cacos_test_data[] =
 
     TEST_c_c (cacos, qnan_value, qnan_value, qnan_value, qnan_value),
 
-    TEST_c_c (cacos, plus_zero, -1.5L, M_PI_2l, 1.194763217287109304111930828519090523536L),
-    TEST_c_c (cacos, minus_zero, -1.5L, M_PI_2l, 1.194763217287109304111930828519090523536L),
-    TEST_c_c (cacos, plus_zero, -1.0L, M_PI_2l, 0.8813735870195430252326093249797923090282L),
-    TEST_c_c (cacos, minus_zero, -1.0L, M_PI_2l, 0.8813735870195430252326093249797923090282L),
-    TEST_c_c (cacos, plus_zero, -0.5L, M_PI_2l, 0.4812118250596034474977589134243684231352L),
-    TEST_c_c (cacos, minus_zero, -0.5L, M_PI_2l, 0.4812118250596034474977589134243684231352L),
-    TEST_c_c (cacos, plus_zero, 0.5L, M_PI_2l, -0.4812118250596034474977589134243684231352L),
-    TEST_c_c (cacos, minus_zero, 0.5L, M_PI_2l, -0.4812118250596034474977589134243684231352L),
-    TEST_c_c (cacos, plus_zero, 1.0L, M_PI_2l, -0.8813735870195430252326093249797923090282L),
-    TEST_c_c (cacos, minus_zero, 1.0L, M_PI_2l, -0.8813735870195430252326093249797923090282L),
-    TEST_c_c (cacos, plus_zero, 1.5L, M_PI_2l, -1.194763217287109304111930828519090523536L),
-    TEST_c_c (cacos, minus_zero, 1.5L, M_PI_2l, -1.194763217287109304111930828519090523536L),
+    TEST_c_c (cacos, plus_zero, -1.5L, lit_pi_2_d, 1.194763217287109304111930828519090523536L),
+    TEST_c_c (cacos, minus_zero, -1.5L, lit_pi_2_d, 1.194763217287109304111930828519090523536L),
+    TEST_c_c (cacos, plus_zero, -1.0L, lit_pi_2_d, 0.8813735870195430252326093249797923090282L),
+    TEST_c_c (cacos, minus_zero, -1.0L, lit_pi_2_d, 0.8813735870195430252326093249797923090282L),
+    TEST_c_c (cacos, plus_zero, -0.5L, lit_pi_2_d, 0.4812118250596034474977589134243684231352L),
+    TEST_c_c (cacos, minus_zero, -0.5L, lit_pi_2_d, 0.4812118250596034474977589134243684231352L),
+    TEST_c_c (cacos, plus_zero, 0.5L, lit_pi_2_d, -0.4812118250596034474977589134243684231352L),
+    TEST_c_c (cacos, minus_zero, 0.5L, lit_pi_2_d, -0.4812118250596034474977589134243684231352L),
+    TEST_c_c (cacos, plus_zero, 1.0L, lit_pi_2_d, -0.8813735870195430252326093249797923090282L),
+    TEST_c_c (cacos, minus_zero, 1.0L, lit_pi_2_d, -0.8813735870195430252326093249797923090282L),
+    TEST_c_c (cacos, plus_zero, 1.5L, lit_pi_2_d, -1.194763217287109304111930828519090523536L),
+    TEST_c_c (cacos, minus_zero, 1.5L, lit_pi_2_d, -1.194763217287109304111930828519090523536L),
 
     TEST_c_c (cacos, -1.5L, plus_zero, M_PIl, -0.9624236501192068949955178268487368462704L),
     TEST_c_c (cacos, -1.5L, minus_zero, M_PIl, 0.9624236501192068949955178268487368462704L),
@@ -2774,22 +2776,22 @@ cacos_test (void)
 
 static const struct test_c_c_data cacosh_test_data[] =
   {
-    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),
-    TEST_c_c (cacosh, minus_zero, minus_zero, 0.0, -M_PI_2l),
+    TEST_c_c (cacosh, 0, 0, 0.0, lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, 0, 0.0, lit_pi_2_d),
+    TEST_c_c (cacosh, 0, minus_zero, 0.0, -lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, minus_zero, 0.0, -lit_pi_2_d),
     TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
     TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
 
-    TEST_c_c (cacosh, -10.0, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (cacosh, -10.0, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (cacosh, 0, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (cacosh, 0, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (cacosh, 0.1L, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (cacosh, 0.1L, minus_infty, plus_infty, -M_PI_2l),
+    TEST_c_c (cacosh, -10.0, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (cacosh, -10.0, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (cacosh, 0, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (cacosh, 0, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (cacosh, 0.1L, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (cacosh, 0.1L, minus_infty, plus_infty, -lit_pi_2_d),
 
     TEST_c_c (cacosh, minus_infty, 0, plus_infty, M_PIl),
     TEST_c_c (cacosh, minus_infty, minus_zero, plus_infty, -M_PIl),
@@ -2818,18 +2820,18 @@ static const struct test_c_c_data cacosh_test_data[] =
 
     TEST_c_c (cacosh, qnan_value, qnan_value, qnan_value, qnan_value),
 
-    TEST_c_c (cacosh, plus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -M_PI_2l),
-    TEST_c_c (cacosh, plus_zero, -1.0L, 0.8813735870195430252326093249797923090282L, -M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, -1.0L, 0.8813735870195430252326093249797923090282L, -M_PI_2l),
-    TEST_c_c (cacosh, plus_zero, -0.5L, 0.4812118250596034474977589134243684231352L, -M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, -0.5L, 0.4812118250596034474977589134243684231352L, -M_PI_2l),
-    TEST_c_c (cacosh, plus_zero, 0.5L, 0.4812118250596034474977589134243684231352L, M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, 0.5L, 0.4812118250596034474977589134243684231352L, M_PI_2l),
-    TEST_c_c (cacosh, plus_zero, 1.0L, 0.8813735870195430252326093249797923090282L, M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, 1.0L, 0.8813735870195430252326093249797923090282L, M_PI_2l),
-    TEST_c_c (cacosh, plus_zero, 1.5L, 1.194763217287109304111930828519090523536L, M_PI_2l),
-    TEST_c_c (cacosh, minus_zero, 1.5L, 1.194763217287109304111930828519090523536L, M_PI_2l),
+    TEST_c_c (cacosh, plus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -lit_pi_2_d),
+    TEST_c_c (cacosh, plus_zero, -1.0L, 0.8813735870195430252326093249797923090282L, -lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, -1.0L, 0.8813735870195430252326093249797923090282L, -lit_pi_2_d),
+    TEST_c_c (cacosh, plus_zero, -0.5L, 0.4812118250596034474977589134243684231352L, -lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, -0.5L, 0.4812118250596034474977589134243684231352L, -lit_pi_2_d),
+    TEST_c_c (cacosh, plus_zero, 0.5L, 0.4812118250596034474977589134243684231352L, lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, 0.5L, 0.4812118250596034474977589134243684231352L, lit_pi_2_d),
+    TEST_c_c (cacosh, plus_zero, 1.0L, 0.8813735870195430252326093249797923090282L, lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, 1.0L, 0.8813735870195430252326093249797923090282L, lit_pi_2_d),
+    TEST_c_c (cacosh, plus_zero, 1.5L, 1.194763217287109304111930828519090523536L, lit_pi_2_d),
+    TEST_c_c (cacosh, minus_zero, 1.5L, 1.194763217287109304111930828519090523536L, lit_pi_2_d),
 
     TEST_c_c (cacosh, -1.5L, plus_zero, 0.9624236501192068949955178268487368462704L, M_PIl),
     TEST_c_c (cacosh, -1.5L, minus_zero, 0.9624236501192068949955178268487368462704L, -M_PIl),
@@ -3466,10 +3468,10 @@ static const struct test_c_f_data carg_test_data[] =
     TEST_c_f (carg, plus_infty, -2.0, minus_zero),
 
     /* carg(x + i inf) == pi/2 for finite x.  */
-    TEST_c_f (carg, 10.0, plus_infty, M_PI_2l),
+    TEST_c_f (carg, 10.0, plus_infty, lit_pi_2_d),
 
     /* carg(x - i inf) == -pi/2 for finite x.  */
-    TEST_c_f (carg, 10.0, minus_infty, -M_PI_2l),
+    TEST_c_f (carg, 10.0, minus_infty, -lit_pi_2_d),
 
     /* carg (-inf + i y) == +pi for finite y > 0.  */
     TEST_c_f (carg, minus_infty, 10.0, M_PIl),
@@ -3517,15 +3519,15 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0.1L, plus_infty, 0.0, plus_infty),
     TEST_c_c (casin, 0.1L, minus_infty, 0.0, minus_infty),
 
-    TEST_c_c (casin, minus_infty, 0, -M_PI_2l, plus_infty),
-    TEST_c_c (casin, minus_infty, minus_zero, -M_PI_2l, minus_infty),
-    TEST_c_c (casin, minus_infty, 100, -M_PI_2l, plus_infty),
-    TEST_c_c (casin, minus_infty, -100, -M_PI_2l, minus_infty),
+    TEST_c_c (casin, minus_infty, 0, -lit_pi_2_d, plus_infty),
+    TEST_c_c (casin, minus_infty, minus_zero, -lit_pi_2_d, minus_infty),
+    TEST_c_c (casin, minus_infty, 100, -lit_pi_2_d, plus_infty),
+    TEST_c_c (casin, minus_infty, -100, -lit_pi_2_d, minus_infty),
 
-    TEST_c_c (casin, plus_infty, 0, M_PI_2l, plus_infty),
-    TEST_c_c (casin, plus_infty, minus_zero, M_PI_2l, minus_infty),
-    TEST_c_c (casin, plus_infty, 0.5, M_PI_2l, plus_infty),
-    TEST_c_c (casin, plus_infty, -0.5, M_PI_2l, minus_infty),
+    TEST_c_c (casin, plus_infty, 0, lit_pi_2_d, plus_infty),
+    TEST_c_c (casin, plus_infty, minus_zero, lit_pi_2_d, minus_infty),
+    TEST_c_c (casin, plus_infty, 0.5, lit_pi_2_d, plus_infty),
+    TEST_c_c (casin, plus_infty, -0.5, lit_pi_2_d, minus_infty),
 
     TEST_c_c (casin, qnan_value, plus_infty, qnan_value, plus_infty),
     TEST_c_c (casin, qnan_value, minus_infty, qnan_value, minus_infty),
@@ -3557,18 +3559,18 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, plus_zero, 1.5L, plus_zero, 1.194763217287109304111930828519090523536L),
     TEST_c_c (casin, minus_zero, 1.5L, minus_zero, 1.194763217287109304111930828519090523536L),
 
-    TEST_c_c (casin, -1.5L, plus_zero, -M_PI_2l, 0.9624236501192068949955178268487368462704L),
-    TEST_c_c (casin, -1.5L, minus_zero, -M_PI_2l, -0.9624236501192068949955178268487368462704L),
-    TEST_c_c (casin, -1.0L, plus_zero, -M_PI_2l, plus_zero),
-    TEST_c_c (casin, -1.0L, minus_zero, -M_PI_2l, minus_zero),
+    TEST_c_c (casin, -1.5L, plus_zero, -lit_pi_2_d, 0.9624236501192068949955178268487368462704L),
+    TEST_c_c (casin, -1.5L, minus_zero, -lit_pi_2_d, -0.9624236501192068949955178268487368462704L),
+    TEST_c_c (casin, -1.0L, plus_zero, -lit_pi_2_d, plus_zero),
+    TEST_c_c (casin, -1.0L, minus_zero, -lit_pi_2_d, minus_zero),
     TEST_c_c (casin, -0.5L, plus_zero, -0.5235987755982988730771072305465838140329L, plus_zero),
     TEST_c_c (casin, -0.5L, minus_zero, -0.5235987755982988730771072305465838140329L, minus_zero),
     TEST_c_c (casin, 0.5L, plus_zero, 0.5235987755982988730771072305465838140329L, plus_zero),
     TEST_c_c (casin, 0.5L, minus_zero, 0.5235987755982988730771072305465838140329L, minus_zero),
-    TEST_c_c (casin, 1.0L, plus_zero, M_PI_2l, plus_zero),
-    TEST_c_c (casin, 1.0L, minus_zero, M_PI_2l, minus_zero),
-    TEST_c_c (casin, 1.5L, plus_zero, M_PI_2l, 0.9624236501192068949955178268487368462704L),
-    TEST_c_c (casin, 1.5L, minus_zero, M_PI_2l, -0.9624236501192068949955178268487368462704L),
+    TEST_c_c (casin, 1.0L, plus_zero, lit_pi_2_d, plus_zero),
+    TEST_c_c (casin, 1.0L, minus_zero, lit_pi_2_d, minus_zero),
+    TEST_c_c (casin, 1.5L, plus_zero, lit_pi_2_d, 0.9624236501192068949955178268487368462704L),
+    TEST_c_c (casin, 1.5L, minus_zero, lit_pi_2_d, -0.9624236501192068949955178268487368462704L),
 
     TEST_c_c (casin, 0x1p50L, 1.0L, 1.570796326794895731052901991514519103193L, 3.535050620855721078027883819436720218708e1L),
     TEST_c_c (casin, 0x1p50L, -1.0L, 1.570796326794895731052901991514519103193L, -3.535050620855721078027883819436720218708e1L),
@@ -4198,14 +4200,14 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, minus_infty, plus_infty, minus_infty, M_PI_4l),
     TEST_c_c (casinh, minus_infty, minus_infty, minus_infty, -M_PI_4l),
 
-    TEST_c_c (casinh, -10.0, plus_infty, minus_infty, M_PI_2l),
-    TEST_c_c (casinh, -10.0, minus_infty, minus_infty, -M_PI_2l),
-    TEST_c_c (casinh, 0, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (casinh, 0, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (casinh, minus_zero, plus_infty, minus_infty, M_PI_2l),
-    TEST_c_c (casinh, minus_zero, minus_infty, minus_infty, -M_PI_2l),
-    TEST_c_c (casinh, 0.1L, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (casinh, 0.1L, minus_infty, plus_infty, -M_PI_2l),
+    TEST_c_c (casinh, -10.0, plus_infty, minus_infty, lit_pi_2_d),
+    TEST_c_c (casinh, -10.0, minus_infty, minus_infty, -lit_pi_2_d),
+    TEST_c_c (casinh, 0, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (casinh, 0, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, plus_infty, minus_infty, lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, minus_infty, minus_infty, -lit_pi_2_d),
+    TEST_c_c (casinh, 0.1L, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (casinh, 0.1L, minus_infty, plus_infty, -lit_pi_2_d),
 
     TEST_c_c (casinh, minus_infty, 0, minus_infty, 0.0),
     TEST_c_c (casinh, minus_infty, minus_zero, minus_infty, minus_zero),
@@ -4234,18 +4236,18 @@ static const struct test_c_c_data casinh_test_data[] =
 
     TEST_c_c (casinh, qnan_value, qnan_value, qnan_value, qnan_value),
 
-    TEST_c_c (casinh, plus_zero, -1.5L, 0.9624236501192068949955178268487368462704L, -M_PI_2l),
-    TEST_c_c (casinh, minus_zero, -1.5L, -0.9624236501192068949955178268487368462704L, -M_PI_2l),
-    TEST_c_c (casinh, plus_zero, -1.0L, plus_zero, -M_PI_2l),
-    TEST_c_c (casinh, minus_zero, -1.0L, minus_zero, -M_PI_2l),
+    TEST_c_c (casinh, plus_zero, -1.5L, 0.9624236501192068949955178268487368462704L, -lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, -1.5L, -0.9624236501192068949955178268487368462704L, -lit_pi_2_d),
+    TEST_c_c (casinh, plus_zero, -1.0L, plus_zero, -lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, -1.0L, minus_zero, -lit_pi_2_d),
     TEST_c_c (casinh, plus_zero, -0.5L, plus_zero, -0.5235987755982988730771072305465838140329L),
     TEST_c_c (casinh, minus_zero, -0.5L, minus_zero, -0.5235987755982988730771072305465838140329L),
     TEST_c_c (casinh, plus_zero, 0.5L, plus_zero, 0.5235987755982988730771072305465838140329L),
     TEST_c_c (casinh, minus_zero, 0.5L, minus_zero, 0.5235987755982988730771072305465838140329L),
-    TEST_c_c (casinh, plus_zero, 1.0L, plus_zero, M_PI_2l),
-    TEST_c_c (casinh, minus_zero, 1.0L, minus_zero, M_PI_2l),
-    TEST_c_c (casinh, plus_zero, 1.5L, 0.9624236501192068949955178268487368462704L, M_PI_2l),
-    TEST_c_c (casinh, minus_zero, 1.5L, -0.9624236501192068949955178268487368462704L, M_PI_2l),
+    TEST_c_c (casinh, plus_zero, 1.0L, plus_zero, lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, 1.0L, minus_zero, lit_pi_2_d),
+    TEST_c_c (casinh, plus_zero, 1.5L, 0.9624236501192068949955178268487368462704L, lit_pi_2_d),
+    TEST_c_c (casinh, minus_zero, 1.5L, -0.9624236501192068949955178268487368462704L, lit_pi_2_d),
 
     TEST_c_c (casinh, -1.5L, plus_zero, -1.194763217287109304111930828519090523536L, plus_zero),
     TEST_c_c (casinh, -1.5L, minus_zero, -1.194763217287109304111930828519090523536L, minus_zero),
@@ -4892,30 +4894,30 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, plus_zero, -1.0L, plus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catan, minus_zero, -1.0L, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION),
 
-    TEST_c_c (catan, plus_infty, plus_infty, M_PI_2l, 0),
-    TEST_c_c (catan, plus_infty, minus_infty, M_PI_2l, minus_zero),
-    TEST_c_c (catan, minus_infty, plus_infty, -M_PI_2l, 0),
-    TEST_c_c (catan, minus_infty, minus_infty, -M_PI_2l, minus_zero),
+    TEST_c_c (catan, plus_infty, plus_infty, lit_pi_2_d, 0),
+    TEST_c_c (catan, plus_infty, minus_infty, lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, minus_infty, plus_infty, -lit_pi_2_d, 0),
+    TEST_c_c (catan, minus_infty, minus_infty, -lit_pi_2_d, minus_zero),
 
 
-    TEST_c_c (catan, plus_infty, -10.0, M_PI_2l, minus_zero),
-    TEST_c_c (catan, minus_infty, -10.0, -M_PI_2l, minus_zero),
-    TEST_c_c (catan, plus_infty, minus_zero, M_PI_2l, minus_zero),
-    TEST_c_c (catan, minus_infty, minus_zero, -M_PI_2l, minus_zero),
-    TEST_c_c (catan, plus_infty, 0.0, M_PI_2l, 0),
-    TEST_c_c (catan, minus_infty, 0.0, -M_PI_2l, 0),
-    TEST_c_c (catan, plus_infty, 0.1L, M_PI_2l, 0),
-    TEST_c_c (catan, minus_infty, 0.1L, -M_PI_2l, 0),
+    TEST_c_c (catan, plus_infty, -10.0, lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, minus_infty, -10.0, -lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, plus_infty, minus_zero, lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, minus_infty, minus_zero, -lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, plus_infty, 0.0, lit_pi_2_d, 0),
+    TEST_c_c (catan, minus_infty, 0.0, -lit_pi_2_d, 0),
+    TEST_c_c (catan, plus_infty, 0.1L, lit_pi_2_d, 0),
+    TEST_c_c (catan, minus_infty, 0.1L, -lit_pi_2_d, 0),
 
-    TEST_c_c (catan, 0.0, minus_infty, M_PI_2l, minus_zero),
-    TEST_c_c (catan, minus_zero, minus_infty, -M_PI_2l, minus_zero),
-    TEST_c_c (catan, 100.0, minus_infty, M_PI_2l, minus_zero),
-    TEST_c_c (catan, -100.0, minus_infty, -M_PI_2l, minus_zero),
+    TEST_c_c (catan, 0.0, minus_infty, lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, minus_zero, minus_infty, -lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, 100.0, minus_infty, lit_pi_2_d, minus_zero),
+    TEST_c_c (catan, -100.0, minus_infty, -lit_pi_2_d, minus_zero),
 
-    TEST_c_c (catan, 0.0, plus_infty, M_PI_2l, 0),
-    TEST_c_c (catan, minus_zero, plus_infty, -M_PI_2l, 0),
-    TEST_c_c (catan, 0.5, plus_infty, M_PI_2l, 0),
-    TEST_c_c (catan, -0.5, plus_infty, -M_PI_2l, 0),
+    TEST_c_c (catan, 0.0, plus_infty, lit_pi_2_d, 0),
+    TEST_c_c (catan, minus_zero, plus_infty, -lit_pi_2_d, 0),
+    TEST_c_c (catan, 0.5, plus_infty, lit_pi_2_d, 0),
+    TEST_c_c (catan, -0.5, plus_infty, -lit_pi_2_d, 0),
 
     TEST_c_c (catan, qnan_value, 0.0, qnan_value, 0),
     TEST_c_c (catan, qnan_value, minus_zero, qnan_value, minus_zero),
@@ -4926,8 +4928,8 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0.0, qnan_value, qnan_value, qnan_value),
     TEST_c_c (catan, minus_zero, qnan_value, qnan_value, qnan_value),
 
-    TEST_c_c (catan, plus_infty, qnan_value, M_PI_2l, 0, IGNORE_ZERO_INF_SIGN),
-    TEST_c_c (catan, minus_infty, qnan_value, -M_PI_2l, 0, IGNORE_ZERO_INF_SIGN),
+    TEST_c_c (catan, plus_infty, qnan_value, lit_pi_2_d, 0, IGNORE_ZERO_INF_SIGN),
+    TEST_c_c (catan, minus_infty, qnan_value, -lit_pi_2_d, 0, IGNORE_ZERO_INF_SIGN),
 
     TEST_c_c (catan, qnan_value, 10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK),
     TEST_c_c (catan, qnan_value, -10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK),
@@ -5398,29 +5400,29 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -M_PI_4l),
     TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -M_PI_4l),
 
-    TEST_c_c (catanh, plus_infty, plus_infty, 0.0, M_PI_2l),
-    TEST_c_c (catanh, plus_infty, minus_infty, 0.0, -M_PI_2l),
-    TEST_c_c (catanh, minus_infty, plus_infty, minus_zero, M_PI_2l),
-    TEST_c_c (catanh, minus_infty, minus_infty, minus_zero, -M_PI_2l),
-
-    TEST_c_c (catanh, -10.0, plus_infty, minus_zero, M_PI_2l),
-    TEST_c_c (catanh, -10.0, minus_infty, minus_zero, -M_PI_2l),
-    TEST_c_c (catanh, minus_zero, plus_infty, minus_zero, M_PI_2l),
-    TEST_c_c (catanh, minus_zero, minus_infty, minus_zero, -M_PI_2l),
-    TEST_c_c (catanh, 0, plus_infty, 0.0, M_PI_2l),
-    TEST_c_c (catanh, 0, minus_infty, 0.0, -M_PI_2l),
-    TEST_c_c (catanh, 0.1L, plus_infty, 0.0, M_PI_2l),
-    TEST_c_c (catanh, 0.1L, minus_infty, 0.0, -M_PI_2l),
-
-    TEST_c_c (catanh, minus_infty, 0, minus_zero, M_PI_2l),
-    TEST_c_c (catanh, minus_infty, minus_zero, minus_zero, -M_PI_2l),
-    TEST_c_c (catanh, minus_infty, 100, minus_zero, M_PI_2l),
-    TEST_c_c (catanh, minus_infty, -100, minus_zero, -M_PI_2l),
-
-    TEST_c_c (catanh, plus_infty, 0, 0.0, M_PI_2l),
-    TEST_c_c (catanh, plus_infty, minus_zero, 0.0, -M_PI_2l),
-    TEST_c_c (catanh, plus_infty, 0.5, 0.0, M_PI_2l),
-    TEST_c_c (catanh, plus_infty, -0.5, 0.0, -M_PI_2l),
+    TEST_c_c (catanh, plus_infty, plus_infty, 0.0, lit_pi_2_d),
+    TEST_c_c (catanh, plus_infty, minus_infty, 0.0, -lit_pi_2_d),
+    TEST_c_c (catanh, minus_infty, plus_infty, minus_zero, lit_pi_2_d),
+    TEST_c_c (catanh, minus_infty, minus_infty, minus_zero, -lit_pi_2_d),
+
+    TEST_c_c (catanh, -10.0, plus_infty, minus_zero, lit_pi_2_d),
+    TEST_c_c (catanh, -10.0, minus_infty, minus_zero, -lit_pi_2_d),
+    TEST_c_c (catanh, minus_zero, plus_infty, minus_zero, lit_pi_2_d),
+    TEST_c_c (catanh, minus_zero, minus_infty, minus_zero, -lit_pi_2_d),
+    TEST_c_c (catanh, 0, plus_infty, 0.0, lit_pi_2_d),
+    TEST_c_c (catanh, 0, minus_infty, 0.0, -lit_pi_2_d),
+    TEST_c_c (catanh, 0.1L, plus_infty, 0.0, lit_pi_2_d),
+    TEST_c_c (catanh, 0.1L, minus_infty, 0.0, -lit_pi_2_d),
+
+    TEST_c_c (catanh, minus_infty, 0, minus_zero, lit_pi_2_d),
+    TEST_c_c (catanh, minus_infty, minus_zero, minus_zero, -lit_pi_2_d),
+    TEST_c_c (catanh, minus_infty, 100, minus_zero, lit_pi_2_d),
+    TEST_c_c (catanh, minus_infty, -100, minus_zero, -lit_pi_2_d),
+
+    TEST_c_c (catanh, plus_infty, 0, 0.0, lit_pi_2_d),
+    TEST_c_c (catanh, plus_infty, minus_zero, 0.0, -lit_pi_2_d),
+    TEST_c_c (catanh, plus_infty, 0.5, 0.0, lit_pi_2_d),
+    TEST_c_c (catanh, plus_infty, -0.5, 0.0, -lit_pi_2_d),
 
     TEST_c_c (catanh, 0, qnan_value, 0.0, qnan_value),
     TEST_c_c (catanh, minus_zero, qnan_value, minus_zero, qnan_value),
@@ -5431,8 +5433,8 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, qnan_value, 0, qnan_value, qnan_value),
     TEST_c_c (catanh, qnan_value, minus_zero, qnan_value, qnan_value),
 
-    TEST_c_c (catanh, qnan_value, plus_infty, 0.0, M_PI_2l, IGNORE_ZERO_INF_SIGN),
-    TEST_c_c (catanh, qnan_value, minus_infty, 0.0, -M_PI_2l, IGNORE_ZERO_INF_SIGN),
+    TEST_c_c (catanh, qnan_value, plus_infty, 0.0, lit_pi_2_d, IGNORE_ZERO_INF_SIGN),
+    TEST_c_c (catanh, qnan_value, minus_infty, 0.0, -lit_pi_2_d, IGNORE_ZERO_INF_SIGN),
 
     TEST_c_c (catanh, 10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK),
     TEST_c_c (catanh, -10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK),
@@ -6251,14 +6253,14 @@ static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -M_PI_4l),
 
-    TEST_c_c (clog, 0, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (clog, 3, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (clog, minus_zero, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (clog, -3, plus_infty, plus_infty, M_PI_2l),
-    TEST_c_c (clog, 0, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (clog, 3, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (clog, minus_zero, minus_infty, plus_infty, -M_PI_2l),
-    TEST_c_c (clog, -3, minus_infty, plus_infty, -M_PI_2l),
+    TEST_c_c (clog, 0, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (clog, 3, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (clog, minus_zero, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (clog, -3, plus_infty, plus_infty, lit_pi_2_d),
+    TEST_c_c (clog, 0, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (clog, 3, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (clog, minus_zero, minus_infty, plus_infty, -lit_pi_2_d),
+    TEST_c_c (clog, -3, minus_infty, plus_infty, -lit_pi_2_d),
 
     TEST_c_c (clog, minus_infty, 0, plus_infty, M_PIl),
     TEST_c_c (clog, minus_infty, 1, plus_infty, M_PIl),
diff --git a/math/test-double.h b/math/test-double.h
index 6783b44..3667883 100644
--- a/math/test-double.h
+++ b/math/test-double.h
@@ -26,4 +26,5 @@
 #define PREFIX DBL
 #define LIT(x) (x)
 #define TYPE_STR "double"
+#define LITM(x) x
 #define FTOSTR snprintf
diff --git a/math/test-float.h b/math/test-float.h
index 9bb3b84..4f9149f 100644
--- a/math/test-float.h
+++ b/math/test-float.h
@@ -26,4 +26,6 @@
 #define PREFIX FLT
 #define TYPE_STR "float"
 #define LIT(x) (x ## f)
+/* Use the double variants of macro constants.  */
+#define LITM(x) x
 #define FTOSTR snprintf
diff --git a/math/test-ldouble.h b/math/test-ldouble.h
index 63f5008..f3a8d8d 100644
--- a/math/test-ldouble.h
+++ b/math/test-ldouble.h
@@ -26,4 +26,5 @@
 #define PREFIX LDBL
 #define TYPE_STR "ldouble"
 #define LIT(x) (x ## L)
+#define LITM(x) x ## l
 #define FTOSTR snprintf
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 07/11] Replace M_El with lit_e in libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (2 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-27 14:00   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 11/11] Generate new format names in auto-libm-test-out Paul E. Murphy
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

This is useful in situations where the long double type is
less precise than the type under test.

    	* libm-test.inc: Replace usage of M_El with
    	(lit_e): New macro.
---
 math/libm-test.inc | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 38f03bd..874b6b8 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -328,6 +328,11 @@ struct ulp_data
 /* pi */
 #define lit_pi			LITM (M_PI)
 
+/* Other useful constants.  */
+
+/* e */
+#define lit_e			LITM (M_E)
+
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
 static int output_ulps;		/* Should ulps printed?  */
@@ -7104,7 +7109,7 @@ static const struct test_f_f_data fabs_test_data[] =
     TEST_f_f (fabs, -min_value, min_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (fabs, -max_value, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (fabs, 38.0, 38.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_f (fabs, -M_El, M_El, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_f (fabs, -lit_e, lit_e, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
 static void
@@ -7940,7 +7945,7 @@ hypot_test (void)
 static const struct test_f_i_data ilogb_test_data[] =
   {
     TEST_f_i (ilogb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_i (ilogb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_i (ilogb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, 0.5, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED);
@@ -9112,7 +9117,7 @@ static const struct test_f_f_data logb_test_data[] =
     TEST_f_f (logb, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 
     TEST_f_f (logb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_f (logb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_f (logb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 01/11] Begin refactor of libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
  2016-05-26 21:43 ` [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-26 22:56   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc Paul E. Murphy
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

Attempt to creatively redefine the macros
to choose tests based on the format being
tested, not the type.

Note, TS 18661 does not define any printf
modifiers, so we need to be a little more
verbose about constructing strings to
output.

	* math/libm-test.inc:
	(TYPE_DECIMAL_DIG): Redefine using type supplied PREFIX macro.
	(TYPE_MIN): Likewise.
	(TYPE_TRUE_MIN): Likewise.
	(TYPE_MAX): Likewise.
	(MIN_EXP): Likewise.
	(MAX_EXP): Likewise.
	(MANT_DIG): Likewise.

	(FSTR_MAX): New macro.
	(__CONCATX): Likewise.
	(QTYPE_STR): Likewise.
	(TEST_COND_binary32): Likewise.
	(TEST_COND_binary64): Likewise.
	(TEST_COND_binary128): Likewise.
	(TEST_COND_ibm128): Likewise.
	(TEST_COND_intel96): Likewise.
	(TEST_COND_m68k96): Likewise.

	(TEST_COND_flt_32): Redefine as equivalent format test macro.
	(TEST_COND_dbl_64): Likewise.
	(TEST_COND_ldbl_96_intel): Likewise.
	(TEST_COND_ldbl_96_m68k): Likewise.
	(TEST_COND_ldbl_128): Likewise.
	(TEST_COND_ldbl_128ibm): Likewise.

	(plus_zero): Redefine using LIT macro.
	(minus_zero): Likewise.
	(plus_infty): Redefine as (INF).
	(minux_infty): Redefine as (-INF).
	(max_value): Redefine as TYPE_MAX.
	(min_value): Redefine as TYPE_MIN.
	(min_subnorm_value): Redefine as TYPE_TRUE_MIN.

	(print_float): Refactor to use snprintf to convert FLOAT values
	to string. This enables dropin replacement of strtof for the
	TS 18661 defined types.
	(update_stats): Likewise.
	(print_complex_function_ulps): Likewise.
	(print_max_error): Likewise.
	(print_complex_max_error): Likewise.
	(check_float_internal): Likewise.

	* math/test-float.h (PREFIX): New macro.
	(LIT): Likewise.
	(TYPE_STR): Likewise.
	(FTOSTR): Likewise.

	* math/test-double.h (PREFIX): New macro.
	(LIT): Likewise.
	(TYPE_STR): Likewise.
	(FTOSTR): Likewise.

	* math/test-ldouble.h (PREFIX): New macro.
	(LIT): Likewise.
	(TYPE_STR): Likewise.
	(FTOSTR): Likewise.
---
 math/libm-test.inc  | 209 +++++++++++++++++++++++++++++-----------------------
 math/test-double.h  |   4 +
 math/test-float.h   |   4 +
 math/test-ldouble.h |   4 +
 4 files changed, 127 insertions(+), 94 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 84104b4..afabe05 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -34,7 +34,13 @@
    the specifier, not the percent and width arguments,
    e.g. "f".
    PRINTF_XEXPR	   Like PRINTF_EXPR, but print in hexadecimal format.
-   PRINTF_NEXPR Like PRINTF_EXPR, but print nice.  */
+   PRINTF_NEXPR Like PRINTF_EXPR, but print nice.
+   PREFIX A macro which defines the prefix for common macros for the
+   type (i.e LDBL, DBL, or FLT).
+   LIT A function which appends the correct suffix to a literal.
+   TYPE_STR A macro which defines a stringitized name of the type.
+   FTOSTR This macro defines a function similar in type to snprintf
+   which converts a FLOAT to a string.  */
 
 /* This testsuite has currently tests for:
    acos, acosh, asin, asinh, atan, atan2, atanh,
@@ -183,31 +189,74 @@ struct ulp_data
 #define NON_FINITE			0x40000
 #define TEST_SNAN			0x80000
 
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+#define TYPE_MIN __CONCATX (PREFIX, _MIN)
+#define TYPE_TRUE_MIN __CONCATX (PREFIX, _TRUE_MIN)
+#define TYPE_MAX __CONCATX (PREFIX, _MAX)
+#define MIN_EXP __CONCATX (PREFIX, _MIN_EXP)
+#define MAX_EXP __CONCATX (PREFIX, _MAX_EXP)
+#define MANT_DIG __CONCATX (PREFIX, _MANT_DIG)
+
+/* Maximum character buffer to store a stringitized FLOAT value.  */
+# define FSTR_MAX (128)
+
+#if TEST_INLINE
+# define QTYPE_STR "i" TYPE_STR
+#else
+# define QTYPE_STR TYPE_STR
+#endif
+
+/* Format specific test macros.  */
+#define TEST_COND_binary32 (MANT_DIG == 24	\
+			    && MIN_EXP == -125	\
+			    && MAX_EXP == 128)
+
+#define TEST_COND_binary64 (MANT_DIG == 53	\
+			    && MIN_EXP == -1021	\
+			    && MAX_EXP == 1024)
+
+#define TEST_COND_binary128 (MANT_DIG == 113		\
+			     && MIN_EXP == -16381	\
+			     && MAX_EXP == 16384)
+
+#define TEST_COND_ibm128 (MANT_DIG == 106)
+
+#define TEST_COND_intel96 (MANT_DIG == 64	\
+			   && MIN_EXP == -16381	\
+			   && MAX_EXP == 16384)
+
+#define TEST_COND_m68k96 (MANT_DIG == 64	\
+			  && MIN_EXP == -16382	\
+			  && MAX_EXP == 16384)
+
 /* Values underflowing only for float.  */
-#ifdef TEST_FLOAT
+#if TEST_COND_binary32
 # define UNDERFLOW_EXCEPTION_FLOAT	UNDERFLOW_EXCEPTION
 # define UNDERFLOW_EXCEPTION_OK_FLOAT	UNDERFLOW_EXCEPTION_OK
 #else
 # define UNDERFLOW_EXCEPTION_FLOAT	0
 # define UNDERFLOW_EXCEPTION_OK_FLOAT	0
 #endif
+
 /* Values underflowing only for double or types with a larger least
    positive normal value.  */
-#if defined TEST_FLOAT || defined TEST_DOUBLE \
-  || (defined TEST_LDOUBLE && LDBL_MIN_EXP >= DBL_MIN_EXP)
+#if TEST_COND_binary32 || TEST_COND_binary64 || TEST_COND_ibm128
 # define UNDERFLOW_EXCEPTION_DOUBLE	UNDERFLOW_EXCEPTION
 # define UNDERFLOW_EXCEPTION_OK_DOUBLE	UNDERFLOW_EXCEPTION_OK
 #else
 # define UNDERFLOW_EXCEPTION_DOUBLE	0
 # define UNDERFLOW_EXCEPTION_OK_DOUBLE	0
 #endif
+
 /* Values underflowing only for IBM long double or types with a larger least
    positive normal value.  */
-#if defined TEST_FLOAT || (defined TEST_LDOUBLE && LDBL_MIN_EXP > DBL_MIN_EXP)
+#if TEST_COND_binary32 || TEST_COND_ibm128
 # define UNDERFLOW_EXCEPTION_LDOUBLE_IBM	UNDERFLOW_EXCEPTION
 #else
 # define UNDERFLOW_EXCEPTION_LDOUBLE_IBM	0
 #endif
+
 /* Values underflowing on architectures detecting tininess before
    rounding, but not on those detecting tininess after rounding.  */
 #define UNDERFLOW_EXCEPTION_BEFORE_ROUNDING	(TININESS_AFTER_ROUNDING \
@@ -227,36 +276,13 @@ struct ulp_data
 #endif
 
 /* Conditions used by tests generated by gen-auto-libm-tests.c.  */
-#ifdef TEST_FLOAT
-# define TEST_COND_flt_32	1
-#else
-# define TEST_COND_flt_32	0
-#endif
-#if defined TEST_DOUBLE || (defined TEST_LDOUBLE && LDBL_MANT_DIG == 53)
-# define TEST_COND_dbl_64	1
-#else
-# define TEST_COND_dbl_64	0
-#endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 64 && LDBL_MIN_EXP == -16381
-# define TEST_COND_ldbl_96_intel	1
-#else
-# define TEST_COND_ldbl_96_intel	0
-#endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 64 && LDBL_MIN_EXP == -16382
-# define TEST_COND_ldbl_96_m68k	1
-#else
-# define TEST_COND_ldbl_96_m68k	0
-#endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 113
-# define TEST_COND_ldbl_128	1
-#else
-# define TEST_COND_ldbl_128	0
-#endif
-#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 106
-# define TEST_COND_ldbl_128ibm	1
-#else
-# define TEST_COND_ldbl_128ibm	0
-#endif
+#define TEST_COND_flt_32 TEST_COND_binary32
+#define TEST_COND_dbl_64 TEST_COND_binary64
+#define TEST_COND_ldbl_96_intel TEST_COND_intel96
+#define TEST_COND_ldbl_96_m68k  TEST_COND_m68k96
+#define TEST_COND_ldbl_128 TEST_COND_binary128
+#define TEST_COND_ldbl_128ibm TEST_COND_ibm128
+
 #if LONG_MAX == 0x7fffffff
 # define TEST_COND_long32	1
 # define TEST_COND_long64	0
@@ -302,26 +328,15 @@ static int output_max_error;	/* Should the maximal errors printed?  */
 static int output_points;	/* Should the single function results printed?  */
 static int ignore_max_ulp;	/* Should we ignore max_ulp?  */
 
-#define plus_zero	CHOOSE (0.0L, 0.0, 0.0f,	\
-				0.0L, 0.0, 0.0f)
-#define minus_zero	CHOOSE (-0.0L, -0.0, -0.0f,	\
-				-0.0L, -0.0, -0.0f)
-#define plus_infty	CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF, \
-				HUGE_VALL, HUGE_VAL, HUGE_VALF)
-#define minus_infty	CHOOSE (-HUGE_VALL, -HUGE_VAL, -HUGE_VALF,	\
-				-HUGE_VALL, -HUGE_VAL, -HUGE_VALF)
+#define plus_zero	LIT (0.0)
+#define minus_zero	LIT (-0.0)
+#define plus_infty	FUNC (__builtin_inf) ()
+#define minus_infty	-(FUNC (__builtin_inf) ())
 #define qnan_value	FUNC (__builtin_nan) ("")
 #define snan_value	FUNC (__builtin_nans) ("")
-#define max_value	CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX,	\
-				LDBL_MAX, DBL_MAX, FLT_MAX)
-#define min_value	CHOOSE (LDBL_MIN, DBL_MIN, FLT_MIN,	\
-				LDBL_MIN, DBL_MIN, FLT_MIN)
-#define min_subnorm_value	CHOOSE (LDBL_TRUE_MIN,	\
-					DBL_TRUE_MIN,	\
-					FLT_TRUE_MIN,	\
-					LDBL_TRUE_MIN,	\
-					DBL_TRUE_MIN,	\
-					FLT_TRUE_MIN)
+#define max_value	TYPE_MAX
+#define min_value	TYPE_MIN
+#define min_subnorm_value TYPE_TRUE_MIN
 
 static FLOAT max_error, real_max_error, imag_max_error;
 
@@ -329,23 +344,12 @@ static FLOAT prev_max_error, prev_real_max_error, prev_imag_max_error;
 
 static FLOAT max_valid_error;
 
-#define MANT_DIG CHOOSE (LDBL_MANT_DIG, DBL_MANT_DIG, FLT_MANT_DIG,  \
-			 LDBL_MANT_DIG, DBL_MANT_DIG, FLT_MANT_DIG)
-#define MIN_EXP CHOOSE (LDBL_MIN_EXP, DBL_MIN_EXP, FLT_MIN_EXP,	\
-			LDBL_MIN_EXP, DBL_MIN_EXP, FLT_MIN_EXP)
-#define MAX_EXP CHOOSE (LDBL_MAX_EXP, DBL_MAX_EXP, FLT_MAX_EXP, \
-			LDBL_MAX_EXP, DBL_MAX_EXP, FLT_MAX_EXP)
 /* Sufficient numbers of digits to represent any floating-point value
    unambiguously (for any choice of the number of bits in the first
    hex digit, in the case of TYPE_HEX_DIG).  When used with printf
    formats where the precision counts only digits after the point, 1
    is subtracted from these values. */
-#define TYPE_DECIMAL_DIG CHOOSE (LDBL_DECIMAL_DIG,	\
-				 DBL_DECIMAL_DIG,	\
-				 FLT_DECIMAL_DIG,	\
-				 LDBL_DECIMAL_DIG,	\
-				 DBL_DECIMAL_DIG,	\
-				 FLT_DECIMAL_DIG)
+#define TYPE_DECIMAL_DIG __CONCATX (PREFIX, _DECIMAL_DIG)
 #define TYPE_HEX_DIG ((MANT_DIG + 6) / 4)
 
 /* Compare KEY (a string, with the name of a function) with ULP (a
@@ -428,8 +432,12 @@ print_float (FLOAT f)
   else if (isnan (f))
     printf ("qNaN\n");
   else
-    printf ("% .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR "\n",
-	    TYPE_DECIMAL_DIG - 1, f, TYPE_HEX_DIG - 1, f);
+    {
+      char fstrn[FSTR_MAX], fstrx[FSTR_MAX];
+      FTOSTR (fstrn, FSTR_MAX, "% .*" PRINTF_EXPR, TYPE_DECIMAL_DIG - 1, f);
+      FTOSTR (fstrx, FSTR_MAX, "% .*" PRINTF_XEXPR, TYPE_HEX_DIG - 1, f);
+      printf ("%s  %s\n", fstrn, fstrx);
+    }
 }
 
 /* Should the message print to screen?  This depends on the verbose flag,
@@ -471,11 +479,10 @@ print_function_ulps (const char *function_name, FLOAT ulp)
 {
   if (output_ulps)
     {
+      char ustrn[FSTR_MAX];
+      FTOSTR (ustrn, FSTR_MAX, "%.0" PRINTF_NEXPR, FUNC (ceil) (ulp));
       fprintf (ulps_file, "Function: \"%s\":\n", function_name);
-      fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
-	       CHOOSE("ldouble", "double", "float",
-		      "ildouble", "idouble", "ifloat"),
-	       FUNC(ceil) (ulp));
+      fprintf (ulps_file, QTYPE_STR ": %s\n", ustrn);
     }
 }
 
@@ -486,21 +493,20 @@ print_complex_function_ulps (const char *function_name, FLOAT real_ulp,
 {
   if (output_ulps)
     {
+      char fstrn[FSTR_MAX];
       if (real_ulp != 0.0)
 	{
+	  FTOSTR (fstrn, FSTR_MAX, "%.0" PRINTF_NEXPR,
+	            FUNC (ceil) (real_ulp));
 	  fprintf (ulps_file, "Function: Real part of \"%s\":\n", function_name);
-	  fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
-		   CHOOSE("ldouble", "double", "float",
-			  "ildouble", "idouble", "ifloat"),
-		   FUNC(ceil) (real_ulp));
+	  fprintf (ulps_file, QTYPE_STR ": %s\n", fstrn);
 	}
       if (imag_ulp != 0.0)
 	{
+	  FTOSTR (fstrn, FSTR_MAX, "%.0" PRINTF_NEXPR,
+	            FUNC (ceil) (imag_ulp));
 	  fprintf (ulps_file, "Function: Imaginary part of \"%s\":\n", function_name);
-	  fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
-		   CHOOSE("ldouble", "double", "float",
-			  "ildouble", "idouble", "ifloat"),
-		   FUNC(ceil) (imag_ulp));
+	  fprintf (ulps_file, QTYPE_STR ": %s\n", fstrn);
 	}
 
 
@@ -548,10 +554,12 @@ print_max_error (const char *func_name)
 
   if (print_screen_max_error (ok))
     {
+      char mestr[FSTR_MAX], pmestr[FSTR_MAX];
+      FTOSTR (mestr, FSTR_MAX, "%.0" PRINTF_NEXPR, FUNC (ceil) (max_error));
+      FTOSTR (pmestr, FSTR_MAX, "%.0" PRINTF_NEXPR, FUNC (ceil) (prev_max_error));
       printf ("Maximal error of `%s'\n", func_name);
-      printf (" is      : %.0" PRINTF_NEXPR " ulp\n", FUNC(ceil) (max_error));
-      printf (" accepted: %.0" PRINTF_NEXPR " ulp\n",
-	      FUNC(ceil) (prev_max_error));
+      printf (" is      : %s ulp\n", mestr);
+      printf (" accepted: %s ulp\n", pmestr);
     }
 
   update_stats (ok);
@@ -584,16 +592,22 @@ print_complex_max_error (const char *func_name)
 
   if (print_screen_max_error (ok))
     {
+      char rmestr[FSTR_MAX], prmestr[FSTR_MAX];
+      char imestr[FSTR_MAX], pimestr[FSTR_MAX];
+      FTOSTR (rmestr, FSTR_MAX, "%.0" PRINTF_NEXPR,
+		FUNC (ceil) (real_max_error));
+      FTOSTR (prmestr, FSTR_MAX, "%.0" PRINTF_NEXPR,
+		FUNC (ceil) (prev_real_max_error));
+      FTOSTR (imestr, FSTR_MAX, "%.0" PRINTF_NEXPR,
+		FUNC (ceil) (imag_max_error));
+      FTOSTR (pimestr, FSTR_MAX, "%.0" PRINTF_NEXPR,
+		FUNC (ceil) (prev_imag_max_error));
       printf ("Maximal error of real part of: %s\n", func_name);
-      printf (" is      : %.0" PRINTF_NEXPR " ulp\n",
-	      FUNC(ceil) (real_max_error));
-      printf (" accepted: %.0" PRINTF_NEXPR " ulp\n",
-	      FUNC(ceil) (prev_real_max_error));
+      printf (" is      : %s ulp\n", rmestr);
+      printf (" accepted: %s ulp\n", prmestr);
       printf ("Maximal error of imaginary part of: %s\n", func_name);
-      printf (" is      : %.0" PRINTF_NEXPR " ulp\n",
-	      FUNC(ceil) (imag_max_error));
-      printf (" accepted: %.0" PRINTF_NEXPR " ulp\n",
-	      FUNC(ceil) (prev_imag_max_error));
+      printf (" is      : %s ulp\n", imestr);
+      printf (" accepted: %s ulp\n", pimestr);
     }
 
   update_stats (ok);
@@ -851,10 +865,17 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
       print_float (expected);
       if (print_diff)
 	{
-	  printf (" difference: % .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR
-		  "\n", TYPE_DECIMAL_DIG - 1, diff, TYPE_HEX_DIG - 1, diff);
-	  printf (" ulp       : % .4" PRINTF_NEXPR "\n", ulps);
-	  printf (" max.ulp   : % .4" PRINTF_NEXPR "\n", max_ulp);
+	  char dstrn[FSTR_MAX], dstrx[FSTR_MAX];
+	  char ustrn[FSTR_MAX], mustrn[FSTR_MAX];
+	  FTOSTR (dstrn, FSTR_MAX, "% .*" PRINTF_EXPR,
+		  TYPE_DECIMAL_DIG - 1, diff);
+	  FTOSTR (dstrx, FSTR_MAX, "% .*" PRINTF_XEXPR,
+		  TYPE_HEX_DIG - 1, diff);
+	  FTOSTR (ustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, ulps);
+	  FTOSTR (mustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, max_ulp);
+	  printf (" difference: %s  %s\n", dstrn, dstrx);
+	  printf (" ulp       : %s\n", ustrn);
+	  printf (" max.ulp   : %s\n", mustrn);
 	}
     }
   update_stats (ok);
diff --git a/math/test-double.h b/math/test-double.h
index 16b4ce8..6783b44 100644
--- a/math/test-double.h
+++ b/math/test-double.h
@@ -23,3 +23,7 @@
 #define PRINTF_NEXPR "f"
 #define TEST_DOUBLE 1
 #define BUILD_COMPLEX(real, imag) (CMPLX ((real), (imag)))
+#define PREFIX DBL
+#define LIT(x) (x)
+#define TYPE_STR "double"
+#define FTOSTR snprintf
diff --git a/math/test-float.h b/math/test-float.h
index 629f6ee..9bb3b84 100644
--- a/math/test-float.h
+++ b/math/test-float.h
@@ -23,3 +23,7 @@
 #define PRINTF_NEXPR "f"
 #define TEST_FLOAT 1
 #define BUILD_COMPLEX(real, imag) (CMPLXF ((real), (imag)))
+#define PREFIX FLT
+#define TYPE_STR "float"
+#define LIT(x) (x ## f)
+#define FTOSTR snprintf
diff --git a/math/test-ldouble.h b/math/test-ldouble.h
index 481561f..63f5008 100644
--- a/math/test-ldouble.h
+++ b/math/test-ldouble.h
@@ -23,3 +23,7 @@
 #define PRINTF_NEXPR "Lf"
 #define TEST_LDOUBLE 1
 #define BUILD_COMPLEX(real, imag) (CMPLXL ((real), (imag)))
+#define PREFIX LDBL
+#define TYPE_STR "ldouble"
+#define LIT(x) (x ## L)
+#define FTOSTR snprintf
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
  2016-05-26 21:43 ` [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c Paul E. Murphy
  2016-05-26 21:43 ` [PATCHv3 01/11] Begin refactor of libm-test.inc Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-27 13:35   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 07/11] Replace M_El with lit_e " Paul E. Murphy
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

This is useful in situations where the long double type is
less precise than the type under test.

	* libm-test.inc: Replace usage of M_PI_4l with
	(lit_pi_4_d): New macro.
---
 math/libm-test.inc | 54 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index d81585b..38f03bd 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -323,6 +323,8 @@ struct ulp_data
 #define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
 /* pi / 2 */
 #define lit_pi_2_d		LITM (M_PI_2)
+/* pi / 4 */
+#define lit_pi_4_d		LITM (M_PI_4)
 /* pi */
 #define lit_pi			LITM (M_PI)
 
@@ -2000,8 +2002,8 @@ static const struct test_ff_f_data atan2_test_data[] =
     TEST_ff_f (atan2, -min_subnorm_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, -max_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
 
-    TEST_ff_f (atan2, plus_infty, plus_infty, M_PI_4l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, plus_infty, lit_pi_4_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, plus_infty, -lit_pi_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, plus_infty, minus_infty, lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, minus_infty, minus_infty, -lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -2098,8 +2100,8 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, minus_infty, plus_infty, lit_pi_3_m_4_d, minus_infty),
     TEST_c_c (cacos, minus_infty, minus_infty, lit_pi_3_m_4_d, plus_infty),
 
-    TEST_c_c (cacos, plus_infty, plus_infty, M_PI_4l, minus_infty),
-    TEST_c_c (cacos, plus_infty, minus_infty, M_PI_4l, plus_infty),
+    TEST_c_c (cacos, plus_infty, plus_infty, lit_pi_4_d, minus_infty),
+    TEST_c_c (cacos, plus_infty, minus_infty, lit_pi_4_d, plus_infty),
 
     TEST_c_c (cacos, -10.0, plus_infty, lit_pi_2_d, minus_infty),
     TEST_c_c (cacos, -10.0, minus_infty, lit_pi_2_d, plus_infty),
@@ -2785,8 +2787,8 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
     TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
-    TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
+    TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
 
     TEST_c_c (cacosh, -10.0, plus_infty, plus_infty, lit_pi_2_d),
     TEST_c_c (cacosh, -10.0, minus_infty, plus_infty, -lit_pi_2_d),
@@ -3481,9 +3483,9 @@ static const struct test_c_f_data carg_test_data[] =
     /* carg (-inf + i y) == -pi for finite y < 0.  */
     TEST_c_f (carg, minus_infty, -10.0, -lit_pi),
 
-    TEST_c_f (carg, plus_infty, plus_infty, M_PI_4l),
+    TEST_c_f (carg, plus_infty, plus_infty, lit_pi_4_d),
 
-    TEST_c_f (carg, plus_infty, minus_infty, -M_PI_4l),
+    TEST_c_f (carg, plus_infty, minus_infty, -lit_pi_4_d),
 
     TEST_c_f (carg, minus_infty, plus_infty, lit_pi_3_m_4_d),
 
@@ -3507,10 +3509,10 @@ static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0, minus_zero, 0.0, minus_zero),
     TEST_c_c (casin, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (casin, plus_infty, plus_infty, M_PI_4l, plus_infty),
-    TEST_c_c (casin, plus_infty, minus_infty, M_PI_4l, minus_infty),
-    TEST_c_c (casin, minus_infty, plus_infty, -M_PI_4l, plus_infty),
-    TEST_c_c (casin, minus_infty, minus_infty, -M_PI_4l, minus_infty),
+    TEST_c_c (casin, plus_infty, plus_infty, lit_pi_4_d, plus_infty),
+    TEST_c_c (casin, plus_infty, minus_infty, lit_pi_4_d, minus_infty),
+    TEST_c_c (casin, minus_infty, plus_infty, -lit_pi_4_d, plus_infty),
+    TEST_c_c (casin, minus_infty, minus_infty, -lit_pi_4_d, minus_infty),
 
     TEST_c_c (casin, -10.0, plus_infty, minus_zero, plus_infty),
     TEST_c_c (casin, -10.0, minus_infty, minus_zero, minus_infty),
@@ -4197,10 +4199,10 @@ static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0, minus_zero, 0.0, minus_zero),
     TEST_c_c (casinh, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (casinh, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (casinh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
-    TEST_c_c (casinh, minus_infty, plus_infty, minus_infty, M_PI_4l),
-    TEST_c_c (casinh, minus_infty, minus_infty, minus_infty, -M_PI_4l),
+    TEST_c_c (casinh, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (casinh, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
+    TEST_c_c (casinh, minus_infty, plus_infty, minus_infty, lit_pi_4_d),
+    TEST_c_c (casinh, minus_infty, minus_infty, minus_infty, -lit_pi_4_d),
 
     TEST_c_c (casinh, -10.0, plus_infty, minus_infty, lit_pi_2_d),
     TEST_c_c (casinh, -10.0, minus_infty, minus_infty, -lit_pi_2_d),
@@ -4887,10 +4889,10 @@ static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0, minus_zero, 0, minus_zero),
     TEST_c_c (catan, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (catan, 1.0L, plus_zero, M_PI_4l, plus_zero),
-    TEST_c_c (catan, 1.0L, minus_zero, M_PI_4l, minus_zero),
-    TEST_c_c (catan, -1.0L, plus_zero, -M_PI_4l, plus_zero),
-    TEST_c_c (catan, -1.0L, minus_zero, -M_PI_4l, minus_zero),
+    TEST_c_c (catan, 1.0L, plus_zero, lit_pi_4_d, plus_zero),
+    TEST_c_c (catan, 1.0L, minus_zero, lit_pi_4_d, minus_zero),
+    TEST_c_c (catan, -1.0L, plus_zero, -lit_pi_4_d, plus_zero),
+    TEST_c_c (catan, -1.0L, minus_zero, -lit_pi_4_d, minus_zero),
     TEST_c_c (catan, plus_zero, 1.0L, plus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catan, minus_zero, 1.0L, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catan, plus_zero, -1.0L, plus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION),
@@ -5397,10 +5399,10 @@ static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 1.0L, minus_zero, plus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catanh, -1.0L, plus_zero, minus_infty, plus_zero, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catanh, -1.0L, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
-    TEST_c_c (catanh, plus_zero, 1.0L, plus_zero, M_PI_4l),
-    TEST_c_c (catanh, minus_zero, 1.0L, minus_zero, M_PI_4l),
-    TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -M_PI_4l),
-    TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -M_PI_4l),
+    TEST_c_c (catanh, plus_zero, 1.0L, plus_zero, lit_pi_4_d),
+    TEST_c_c (catanh, minus_zero, 1.0L, minus_zero, lit_pi_4_d),
+    TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -lit_pi_4_d),
+    TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -lit_pi_4_d),
 
     TEST_c_c (catanh, plus_infty, plus_infty, 0.0, lit_pi_2_d),
     TEST_c_c (catanh, plus_infty, minus_infty, 0.0, -lit_pi_2_d),
@@ -6252,8 +6254,8 @@ static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
     TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
-    TEST_c_c (clog, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -M_PI_4l),
+    TEST_c_c (clog, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
 
     TEST_c_c (clog, 0, plus_infty, plus_infty, lit_pi_2_d),
     TEST_c_c (clog, 3, plus_infty, plus_infty, lit_pi_2_d),
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
@ 2016-05-26 21:43 ` Paul E. Murphy
  2016-05-27 17:32   ` Joseph Myers
  2016-05-26 21:43 ` [PATCHv3 01/11] Begin refactor of libm-test.inc Paul E. Murphy
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:43 UTC (permalink / raw)
  To: libc-alpha

With the exception of the second argument of nexttoward,
any suffixes should be stripped from the test input, and
the macro LIT(x) should be applied to use the correct
suffix for the type being tested.

This adds a new argument type "j" to gen-test-libm.pl
to signify an explicitly long double argument.  The
test macros are renamed as such, and the naming is
updated.

This applies post-processing to all of the test inputs
through gen-libm-test.pl to strip literal suffixes and
apply the LIT(x) macro, with one exception stated above.
This seems a bit cleaner than tossing the macro onto
everything albeit slightly more obfuscated.

	* math/gen-libm-test.pl: (wrap_lit): New subroutine.
	(apply_lit): Likewise.
	(apply_suf): Likewise.
	(parse_args): Strip C suffix from floating point literals
	and wrap them with LIT(), or add "L" for long double
	type arguments.

	* math/libm-tests.inc (nexttoward_test_data): Rename
	using new test type TEST_fj_f instead of TEST_ff_f.
	(RUN_TEST_LOOP_fj_f): New macro.
	(test_ff_f_data_nexttoward): Rename to
	(test_fj_f_data): New struct.
---
 math/gen-libm-test.pl |  58 ++++++++++++++--
 math/libm-test.inc    | 184 ++++++++++++++++++++++++++------------------------
 2 files changed, 147 insertions(+), 95 deletions(-)

diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index c42a53b..30b5406 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -153,6 +153,38 @@ sub show_exceptions {
   }
 }
 
+# Apply a prefix and suffix to a floating point value after
+# stripping the suffix, or return the unaltered string.
+sub wrap_lit {
+  my ($lit,$prefix,$suffix) = @_;
+  my $exp_re = "([+-])?[[:digit:]]+";
+  # Don't wrap something that does not look like a:
+  # hexadecimal FP value,
+  # base 10 integer raised to a power,
+  # something with a decimal point.
+  return $lit if $lit !~ /([+-])?0x[[:xdigit:]\.]+[pP]$exp_re/
+      		 and $lit !~ /[[:digit:]]+[eE]$exp_re/
+      		 and $lit !~ /[[:digit:]]*\.[[:digit:]]*([eE]$exp_re)?/;
+
+  # Strip any existing literal suffix.
+  $lit =~ s/[lLfF]$//;
+  return "${prefix}${lit}${suffix}";
+}
+
+# Apply the LIT(x) macro to a literal floating point constant
+# and strip any existing suffix.
+sub apply_lit {
+  my ($lit) = @_;
+  return wrap_lit ($lit, "LIT (", ")");
+}
+
+# Apply a supplied suffix to a literal floating point constant,
+# replacing the existing suffix if any.
+sub apply_suf {
+  my ($lit, $suf) = @_;
+  return wrap_lit ($lit, "", $suf);
+}
+
 # Parse the arguments to TEST_x_y
 sub parse_args {
   my ($file, $descr, $args) = @_;
@@ -182,7 +214,7 @@ sub parse_args {
       $comma = ', ';
     }
     # FLOAT, int, long int, long long int
-    if ($descr[$i] =~ /f|i|l|L/) {
+    if ($descr[$i] =~ /f|j|i|l|L/) {
       $call_args .= $comma . &beautify ($args[$current_arg]);
       ++$current_arg;
       next;
@@ -242,8 +274,14 @@ sub parse_args {
   @descr = split //,$descr_args;
   for ($i=0; $i <= $#descr; $i++) {
     # FLOAT, int, long int, long long int
-    if ($descr[$i] =~ /f|i|l|L/) {
-      $cline .= ", $args[$current_arg]";
+    if ($descr[$i] =~ /f|j|i|l|L/) {
+      if ($descr[$i] eq "f") {
+        $cline .= ", " . &apply_lit ($args[$current_arg]);
+      } elsif ($descr[$i] eq "j") {
+        $cline .= ", " . &apply_suf ($args[$current_arg], "L");
+      } else {
+        $cline .= ", $args[$current_arg]";
+      }
       $current_arg++;
       next;
     }
@@ -253,7 +291,8 @@ sub parse_args {
     }
     # complex
     if ($descr[$i] eq 'c') {
-      $cline .= ", $args[$current_arg], $args[$current_arg+1]";
+      $cline .= ", " . &apply_lit ($args[$current_arg]);
+      $cline .= ", " . &apply_lit ($args[$current_arg+1]);
       $current_arg += 2;
       next;
     }
@@ -275,7 +314,7 @@ sub parse_args {
     $cline_res = "";
     @special = ();
     foreach (@descr) {
-      if ($_ =~ /b|f|i|l|L/ ) {
+      if ($_ =~ /b|f|j|i|l|L/ ) {
 	my ($result) = $args_res[$current_arg];
 	if ($result eq "IGNORE") {
 	  $ignore_result_any = 1;
@@ -283,6 +322,11 @@ sub parse_args {
 	} else {
 	  $ignore_result_all = 0;
 	}
+	if ($_ eq "f") {
+	  $result = apply_lit ($result);
+	} elsif ($_ eq "j") {
+          $result = apply_suf ($result, "L");
+	}
 	$cline_res .= ", $result";
 	$current_arg++;
       } elsif ($_ eq 'c') {
@@ -300,6 +344,8 @@ sub parse_args {
 	} else {
 	  $ignore_result_all = 0;
 	}
+	$result1 = apply_lit ($result1);
+	$result2 = apply_lit ($result2);
 	$cline_res .= ", $result1, $result2";
 	$current_arg += 2;
       } elsif ($_ eq '1') {
@@ -330,6 +376,8 @@ sub parse_args {
       my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
       if (!$run_extra) {
 	$extra_expected = "0";
+      } else {
+	$extra_expected = apply_lit ($extra_expected);
       }
       $cline_res .= ", $run_extra, $extra_expected";
     }
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 874b6b8..5d10460 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1118,7 +1118,10 @@ struct test_ff_f_data
     int exceptions;
   } rd, rn, rz, ru;
 };
-struct test_ff_f_data_nexttoward
+
+/* The "j" type argument indicates an explicitly long double
+   argument here.  */
+struct test_fj_f_data
 {
   const char *arg_str;
   FLOAT arg1;
@@ -1392,6 +1395,7 @@ struct test_fFF_11_data
   ROUND_RESTORE_ ## ROUNDING_MODE
 #define RUN_TEST_ff_f RUN_TEST_2_f
 #define RUN_TEST_LOOP_ff_f RUN_TEST_LOOP_2_f
+#define RUN_TEST_LOOP_fj_f RUN_TEST_LOOP_2_f
 #define RUN_TEST_fi_f RUN_TEST_2_f
 #define RUN_TEST_LOOP_fi_f RUN_TEST_LOOP_2_f
 #define RUN_TEST_fl_f RUN_TEST_2_f
@@ -10015,110 +10019,110 @@ nextafter_test (void)
 }
 
 
-static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
+static const struct test_fj_f_data nexttoward_test_data[] =
   {
-    TEST_ff_f (nexttoward, 0, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_zero, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, 9, 9, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -9, -9, -9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, minus_infty, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, plus_infty, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.1L, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.1L, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, max_value, plus_infty, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -max_value, minus_infty, minus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-
-    TEST_ff_f (nexttoward, min_subnorm_value, 0, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, min_subnorm_value, minus_zero, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, 0, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_zero, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, 9, 9, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -9, -9, -9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, minus_infty, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, plus_infty, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.1L, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.1L, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, max_value, plus_infty, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -max_value, minus_infty, minus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
+
+    TEST_fj_f (nexttoward, min_subnorm_value, 0, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, min_subnorm_value, minus_zero, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
 
 #if TEST_COND_binary32
-    TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0.9L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, -LDBL_MAX, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -1.1L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -LDBL_MAX, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0.9L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, LDBL_MAX, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -0x1.3p-145, -0xap-148L, -0x1.4p-145, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
+    TEST_fj_f (nexttoward, 1.0, 1.1L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, LDBL_MAX, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0.9L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, -LDBL_MAX, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -1.1L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -LDBL_MAX, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0.9L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, LDBL_MAX, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -0x1.3p-145, -0xap-148L, -0x1.4p-145, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
 # if LDBL_MANT_DIG >= 64
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 106
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 113
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
 #if TEST_COND_binary64
-    TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0.9L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, -LDBL_MAX, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -1.1L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -LDBL_MAX, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0.9L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, LDBL_MAX, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x8.00346dc5d6388p-3L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 0x1p-1074, 0x1p-1073L, 0x1p-1073, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
+    TEST_fj_f (nexttoward, 1.0, 1.1L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, LDBL_MAX, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0.9L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, -LDBL_MAX, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -1.1L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -LDBL_MAX, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0.9L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, LDBL_MAX, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x8.00346dc5d6388p-3L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 0x1p-1074, 0x1p-1073L, 0x1p-1073, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
 # if LDBL_MANT_DIG >= 64
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 106
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 113
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
   };
@@ -10126,7 +10130,7 @@ static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
 static void
 nexttoward_test (void)
 {
-  ALL_RM_TEST (nexttoward, 1, nexttoward_test_data, RUN_TEST_LOOP_ff_f, END);
+  ALL_RM_TEST (nexttoward, 1, nexttoward_test_data, RUN_TEST_LOOP_fj_f, END);
 }
 
 
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 10/11] Remove type specific information from auto-libm-test-in
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (8 preceding siblings ...)
  2016-05-26 21:53 ` [PATCHv3 05/11] Replace M_PIl with lit_pi " Paul E. Murphy
@ 2016-05-26 21:53 ` Paul E. Murphy
  2016-06-03 20:37   ` Joseph Myers
  2016-05-26 22:45 ` [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc Paul E. Murphy
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:53 UTC (permalink / raw)
  To: libc-alpha

Apply the following sed regexes to auto-libm-test-in in order:

s/flt-32/binary32/
s/dbl-64/binary64/
s/ldbl-96-intel/intel96/
s/ldbl-96-m68k/m68k96/
s/ldbl-128ibm/ibm128/
s/ldbl-128/binary128/

and fixup ldbl-96 comment manually.

	* auto-libm-test-in:
	Replace flt-32 usage with binary32.
	Replace dbl-64 usage with binary64.
	Replace ldbl-intel-96 usage with intel96.
	Replace ldbl-m68k-96 usage with m68k96.
	Replace ldbl-128ibm usage with ibm128.
	Replace ldbl-128 usage with binary128.

	* auto-libm-test-out: Regenerate.
---
 math/auto-libm-test-in | 115 +++++++++++++++++++++++++------------------------
 1 file changed, 58 insertions(+), 57 deletions(-)

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 72a1f3c..ffcc40a 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -1175,8 +1175,8 @@ cosh -0xd.0c03p+0
 cosh -0x3.d04328728b72cp-4
 cosh 0x1.629188p+4
 # GCC bug 59666: results on directed rounding may be incorrect.
-cosh max no-test-inline xfail-rounding:ldbl-128ibm
-cosh -max no-test-inline xfail-rounding:ldbl-128ibm
+cosh max no-test-inline xfail-rounding:ibm128
+cosh -max no-test-inline xfail-rounding:ibm128
 cosh min
 cosh -min
 cosh min_subnorm
@@ -1191,22 +1191,22 @@ cosh 0x5.96a7e8p+4
 cosh -0x5.96a7ep+4
 cosh -0x5.96a7e8p+4
 # GCC bug 59666: results on directed rounding may be incorrect.
-cosh 0x2.c679d1f73f0fap+8 xfail-rounding:ldbl-128ibm
-cosh 0x2.c679d1f73f0fcp+8 xfail-rounding:ldbl-128ibm
-cosh -0x2.c679d1f73f0fap+8 xfail-rounding:ldbl-128ibm
-cosh -0x2.c679d1f73f0fcp+8 xfail-rounding:ldbl-128ibm
-cosh 0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ldbl-128ibm
-cosh 0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ldbl-128ibm
-cosh -0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ldbl-128ibm
-cosh -0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ldbl-128ibm
-cosh 0x2.c5d37700c6bb03a4p+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh 0x2.c5d37700c6bb03a8p+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh -0x2.c5d37700c6bb03a4p+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh -0x2.c5d37700c6bb03a8p+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh -0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline xfail-rounding:ldbl-128ibm
-cosh -0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline xfail-rounding:ldbl-128ibm
+cosh 0x2.c679d1f73f0fap+8 xfail-rounding:ibm128
+cosh 0x2.c679d1f73f0fcp+8 xfail-rounding:ibm128
+cosh -0x2.c679d1f73f0fap+8 xfail-rounding:ibm128
+cosh -0x2.c679d1f73f0fcp+8 xfail-rounding:ibm128
+cosh 0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ibm128
+cosh 0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ibm128
+cosh -0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ibm128
+cosh -0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ibm128
+cosh 0x2.c5d37700c6bb03a4p+12 no-test-inline xfail-rounding:ibm128
+cosh 0x2.c5d37700c6bb03a8p+12 no-test-inline xfail-rounding:ibm128
+cosh -0x2.c5d37700c6bb03a4p+12 no-test-inline xfail-rounding:ibm128
+cosh -0x2.c5d37700c6bb03a8p+12 no-test-inline xfail-rounding:ibm128
+cosh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline xfail-rounding:ibm128
+cosh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline xfail-rounding:ibm128
+cosh -0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline xfail-rounding:ibm128
+cosh -0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline xfail-rounding:ibm128
 
 cpow 1 0 0 0 ignore-zero-inf-sign
 cpow 2 0 10 0 ignore-zero-inf-sign
@@ -1410,8 +1410,8 @@ ctan 1 47
 ctan 1 355
 ctan 1 365
 # GCC bug 59666: results on directed rounding may be incorrect.
-ctan 1 5680 xfail-rounding:ldbl-128ibm
-ctan 1 5690 xfail-rounding:ldbl-128ibm
+ctan 1 5680 xfail-rounding:ibm128
+ctan 1 5690 xfail-rounding:ibm128
 
 ctan 0x3.243f6cp-1 0
 
@@ -1420,10 +1420,10 @@ ctan 0x1p1023 1
 ctan 0x1p16383 1
 
 # GCC bug 59666: results on directed rounding may be incorrect.
-ctan 50000 50000 xfail-rounding:ldbl-128ibm
-ctan 50000 -50000 xfail-rounding:ldbl-128ibm
-ctan -50000 50000 xfail-rounding:ldbl-128ibm
-ctan -50000 -50000 xfail-rounding:ldbl-128ibm
+ctan 50000 50000 xfail-rounding:ibm128
+ctan 50000 -50000 xfail-rounding:ibm128
+ctan -50000 50000 xfail-rounding:ibm128
+ctan -50000 -50000 xfail-rounding:ibm128
 
 ctan 0x1.921fb6p+0 0x1p-149
 ctan 0x1.921fb54442d18p+0 0x1p-1074
@@ -1453,8 +1453,8 @@ ctanh 47 1
 ctanh 355 1
 ctanh 365 1
 # GCC bug 59666: results on directed rounding may be incorrect.
-ctanh 5680 1 xfail-rounding:ldbl-128ibm
-ctanh 5690 1 xfail-rounding:ldbl-128ibm
+ctanh 5680 1 xfail-rounding:ibm128
+ctanh 5690 1 xfail-rounding:ibm128
 
 ctanh 0 0x3.243f6cp-1
 
@@ -1463,10 +1463,10 @@ ctanh 1 0x1p1023
 ctanh 1 0x1p16383
 
 # GCC bug 59666: results on directed rounding may be incorrect.
-ctanh 50000 50000 xfail-rounding:ldbl-128ibm
-ctanh 50000 -50000 xfail-rounding:ldbl-128ibm
-ctanh -50000 50000 xfail-rounding:ldbl-128ibm
-ctanh -50000 -50000 xfail-rounding:ldbl-128ibm
+ctanh 50000 50000 xfail-rounding:ibm128
+ctanh 50000 -50000 xfail-rounding:ibm128
+ctanh -50000 50000 xfail-rounding:ibm128
+ctanh -50000 -50000 xfail-rounding:ibm128
 
 ctanh 0x1p-149 0x1.921fb6p+0
 ctanh 0x1p-1074 0x1.921fb54442d18p+0
@@ -1672,13 +1672,13 @@ exp 50.0
 exp 88.72269439697265625
 exp 709.75
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp 1000.0 xfail-rounding:ldbl-128ibm
-exp 710 xfail-rounding:ldbl-128ibm
+exp 1000.0 xfail-rounding:ibm128
+exp 710 xfail-rounding:ibm128
 exp -1234
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp 0x2.c679d1f73f0fb628p+8 xfail-rounding:ldbl-128ibm
-exp 1e5 xfail-rounding:ldbl-128ibm
-exp max xfail-rounding:ldbl-128ibm
+exp 0x2.c679d1f73f0fb628p+8 xfail-rounding:ibm128
+exp 1e5 xfail-rounding:ibm128
+exp max xfail-rounding:ibm128
 exp -7.4444006192138124e+02
 exp -0x1.75f113c30b1c8p+9
 exp -max
@@ -1757,21 +1757,21 @@ exp10 -36
 exp10 305
 exp10 -305
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp10 4932 xfail-rounding:ldbl-128ibm
+exp10 4932 xfail-rounding:ibm128
 exp10 -4932
 exp10 -0x1.343793004f503232p12
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp10 1e5 xfail-rounding:ldbl-128ibm
+exp10 1e5 xfail-rounding:ibm128
 exp10 -1e5
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp10 1e6 xfail-rounding:ldbl-128ibm
+exp10 1e6 xfail-rounding:ibm128
 exp10 -1e6
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp10 max xfail-rounding:ldbl-128ibm
+exp10 max xfail-rounding:ibm128
 exp10 -max
 exp10 0.75
 # GCC bug 59666: results on directed rounding may be incorrect.
-exp10 0x1.348e45573a1dd72cp+8 xfail-rounding:ldbl-128ibm
+exp10 0x1.348e45573a1dd72cp+8 xfail-rounding:ibm128
 exp10 -0x1.33aa03p+8
 exp10 -0x1.33ad17p+8
 exp10 -0x1.33afcap+8
@@ -1955,7 +1955,7 @@ expm1 100
 expm1 127.0
 expm1 500.0
 # GCC bug 59666: results on directed rounding may be incorrect.
-expm1 11356.25 xfail-rounding:ldbl-128ibm
+expm1 11356.25 xfail-rounding:ibm128
 expm1 -10.0
 expm1 -16.0
 expm1 -17.0
@@ -1977,8 +1977,8 @@ expm1 -1000.0
 expm1 -10000.0
 expm1 -100000.0
 # GCC bug 59666: results on directed rounding may be incorrect.
-expm1 100000.0 xfail-rounding:ldbl-128ibm
-expm1 max xfail-rounding:ldbl-128ibm
+expm1 100000.0 xfail-rounding:ibm128
+expm1 max xfail-rounding:ibm128
 expm1 -max
 expm1 0x1p-2
 expm1 -0x1p-2
@@ -2317,10 +2317,10 @@ hypot 0.75 1.25
 hypot 1.0 0x1p-61
 hypot 0x1p+0 0x1.fp-129
 hypot 0x1.23456789abcdef0123456789ab8p-500 0x1.23456789abcdef0123456789ab8p-500
-hypot 0x3p125 0x4p125 no-test-inline:flt-32
-hypot 0x1.234566p-126 0x1.234566p-126 no-test-inline:flt-32
-hypot 0x3p1021 0x4p1021 no-test-inline:dbl-64
-hypot 0x1p+0 0x0.3ep-1022 no-test-inline:dbl-64
+hypot 0x3p125 0x4p125 no-test-inline:binary32
+hypot 0x1.234566p-126 0x1.234566p-126 no-test-inline:binary32
+hypot 0x3p1021 0x4p1021 no-test-inline:binary64
+hypot 0x1p+0 0x0.3ep-1022 no-test-inline:binary64
 hypot 0x3p16381 0x4p16381 no-test-inline
 hypot 0x1p-149 0x1p-149
 hypot 0x1p-1074 0x1p-1074
@@ -2567,18 +2567,19 @@ lgamma -0x1p-16494
 # where a result inaccurate by a few ulp could differ from the ideal
 # result in whether it overflows; +/- 10ulp is sufficient for overflow
 # or its absence to be unambiguous under glibc's accuracy standards).
-# This also means the ldbl-128ibm inputs are XFAILed for dbl-64 and
-# the ldbl-128 inputs for ldbl-96, as too close to the threshold.
+# This also means the ibm128 inputs are XFAILed for binary64 and
+# the binary128 inputs for intel96 and m68k96, as too close to the
+# threshold.
 lgamma 0x3.12be0cp+120
 lgamma 0x3.12be6p+120
 lgamma 0x5.d53649e2d4674p+1012
 lgamma 0x5.d53649e2d46c8p+1012
-lgamma 0x5.d53649e2d469dbc1f01e99fd52p+1012 xfail:dbl-64
-lgamma 0x5.d53649e2d469dbc1f01e99fd7cp+1012 xfail:dbl-64
+lgamma 0x5.d53649e2d469dbc1f01e99fd52p+1012 xfail:binary64
+lgamma 0x5.d53649e2d469dbc1f01e99fd7cp+1012 xfail:binary64
 lgamma 0x5.c6aa645fffef5f5p+16368
 lgamma 0x5.c6aa645fffef5ff8p+16368
-lgamma 0x5.c6aa645fffef5fa912b9b480f7acp+16368 xfail:ldbl-96-intel xfail:ldbl-96-m68k
-lgamma 0x5.c6aa645fffef5fa912b9b480f8p+16368 xfail:ldbl-96-intel xfail:ldbl-96-m68k
+lgamma 0x5.c6aa645fffef5fa912b9b480f7acp+16368 xfail:intel96 xfail:m68k96
+lgamma 0x5.c6aa645fffef5fa912b9b480f8p+16368 xfail:intel96 xfail:m68k96
 
 lgamma -0x1.fa471547c2fe5p+1
 lgamma -0x1.9260dcp+1
@@ -2832,7 +2833,7 @@ lgamma -60.25
 lgamma -60.5
 lgamma -60.75
 
-# Integers +/- 1ulp for ldbl-128 (gen-auto-libm-tests will round these
+# Integers +/- 1ulp for binary128 (gen-auto-libm-tests will round these
 # to produce integers +/- 1ulp for other formats).
 lgamma -0xf.fffffffffffffffffffffffffff8p-4
 lgamma -0x1.0000000000000000000000000001p+0
@@ -4215,19 +4216,19 @@ tgamma -0x1p-127
 # IEEE semantics mean overflow very close to the threshold depends on
 # the rounding mode; gen-auto-libm-tests does not reflect that glibc
 # does not try to achieve this.
-tgamma 0x1p-128 spurious-overflow:flt-32
+tgamma 0x1p-128 spurious-overflow:binary32
 tgamma -0x1p-128
 tgamma 0x1p-149
 tgamma -0x1p-149
 tgamma 0x1p-1023
 tgamma -0x1p-1023
-tgamma 0x1p-1024 spurious-overflow:dbl-64 spurious-overflow:ldbl-128ibm
+tgamma 0x1p-1024 spurious-overflow:binary64 spurious-overflow:ibm128
 tgamma -0x1p-1024
 tgamma 0x1p-1074
 tgamma -0x1p-1074
 tgamma 0x1p-16383
 tgamma -0x1p-16383
-tgamma 0x1p-16384 spurious-overflow:ldbl-96-intel spurious-overflow:ldbl-96-m68k spurious-overflow:ldbl-128
+tgamma 0x1p-16384 spurious-overflow:intel96 spurious-overflow:m68k96 spurious-overflow:binary128
 tgamma -0x1p-16384
 tgamma 0x1p-16445
 tgamma -0x1p-16445
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 05/11] Replace M_PIl with lit_pi in libm-test.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (7 preceding siblings ...)
  2016-05-26 21:43 ` [PATCHv3 03/11] Refactor M_ macros defined " Paul E. Murphy
@ 2016-05-26 21:53 ` Paul E. Murphy
  2016-05-27 13:33   ` Joseph Myers
  2016-05-26 21:53 ` [PATCHv3 10/11] Remove type specific information from auto-libm-test-in Paul E. Murphy
  2016-05-26 22:45 ` [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc Paul E. Murphy
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 21:53 UTC (permalink / raw)
  To: libc-alpha

This is useful in situations where the long double type is
less precise than the type under test.

	* libm-test.inc: Replace usage of M_PIl with
	(lit_pi): New macro.
---
 math/libm-test.inc | 78 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 40 insertions(+), 38 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index a23b812..d81585b 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -323,6 +323,8 @@ struct ulp_data
 #define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
 /* pi / 2 */
 #define lit_pi_2_d		LITM (M_PI_2)
+/* pi */
+#define lit_pi			LITM (M_PI)
 
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
@@ -1985,18 +1987,18 @@ static const struct test_ff_f_data atan2_test_data[] =
     TEST_ff_f (atan2, minus_infty, -max_value, -lit_pi_2_d, ERRNO_UNCHANGED),
 
     /* atan2 (y,-inf) == +pi for finite y > 0 or +0.  */
-    TEST_ff_f (atan2, 1, minus_infty, M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_zero, minus_infty, M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, min_value, minus_infty, M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, min_subnorm_value, minus_infty, M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, max_value, minus_infty, M_PIl, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, 1, minus_infty, lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_zero, minus_infty, lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, min_value, minus_infty, lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, min_subnorm_value, minus_infty, lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, max_value, minus_infty, lit_pi, ERRNO_UNCHANGED),
 
     /* atan2 (y,-inf) == -pi for finite y < 0 or -0.  */
-    TEST_ff_f (atan2, -1, minus_infty, -M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_zero, minus_infty, -M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, -min_value, minus_infty, -M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, -min_subnorm_value, minus_infty, -M_PIl, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, -max_value, minus_infty, -M_PIl, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, -1, minus_infty, -lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_zero, minus_infty, -lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, -min_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, -min_subnorm_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, -max_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
 
     TEST_ff_f (atan2, plus_infty, plus_infty, M_PI_4l, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l, ERRNO_UNCHANGED),
@@ -2106,10 +2108,10 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, 0.1L, plus_infty, lit_pi_2_d, minus_infty),
     TEST_c_c (cacos, 0.1L, minus_infty, lit_pi_2_d, plus_infty),
 
-    TEST_c_c (cacos, minus_infty, 0, M_PIl, minus_infty),
-    TEST_c_c (cacos, minus_infty, minus_zero, M_PIl, plus_infty),
-    TEST_c_c (cacos, minus_infty, 100, M_PIl, minus_infty),
-    TEST_c_c (cacos, minus_infty, -100, M_PIl, plus_infty),
+    TEST_c_c (cacos, minus_infty, 0, lit_pi, minus_infty),
+    TEST_c_c (cacos, minus_infty, minus_zero, lit_pi, plus_infty),
+    TEST_c_c (cacos, minus_infty, 100, lit_pi, minus_infty),
+    TEST_c_c (cacos, minus_infty, -100, lit_pi, plus_infty),
 
     TEST_c_c (cacos, plus_infty, 0, 0.0, minus_infty),
     TEST_c_c (cacos, plus_infty, minus_zero, 0.0, plus_infty),
@@ -2146,10 +2148,10 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, plus_zero, 1.5L, lit_pi_2_d, -1.194763217287109304111930828519090523536L),
     TEST_c_c (cacos, minus_zero, 1.5L, lit_pi_2_d, -1.194763217287109304111930828519090523536L),
 
-    TEST_c_c (cacos, -1.5L, plus_zero, M_PIl, -0.9624236501192068949955178268487368462704L),
-    TEST_c_c (cacos, -1.5L, minus_zero, M_PIl, 0.9624236501192068949955178268487368462704L),
-    TEST_c_c (cacos, -1.0L, plus_zero, M_PIl, minus_zero),
-    TEST_c_c (cacos, -1.0L, minus_zero, M_PIl, plus_zero),
+    TEST_c_c (cacos, -1.5L, plus_zero, lit_pi, -0.9624236501192068949955178268487368462704L),
+    TEST_c_c (cacos, -1.5L, minus_zero, lit_pi, 0.9624236501192068949955178268487368462704L),
+    TEST_c_c (cacos, -1.0L, plus_zero, lit_pi, minus_zero),
+    TEST_c_c (cacos, -1.0L, minus_zero, lit_pi, plus_zero),
     TEST_c_c (cacos, -0.5L, plus_zero, 2.094395102393195492308428922186335256131L, minus_zero),
     TEST_c_c (cacos, -0.5L, minus_zero, 2.094395102393195492308428922186335256131L, plus_zero),
     TEST_c_c (cacos, 0.5L, plus_zero, 1.047197551196597746154214461093167628066L, minus_zero),
@@ -2793,10 +2795,10 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, 0.1L, plus_infty, plus_infty, lit_pi_2_d),
     TEST_c_c (cacosh, 0.1L, minus_infty, plus_infty, -lit_pi_2_d),
 
-    TEST_c_c (cacosh, minus_infty, 0, plus_infty, M_PIl),
-    TEST_c_c (cacosh, minus_infty, minus_zero, plus_infty, -M_PIl),
-    TEST_c_c (cacosh, minus_infty, 100, plus_infty, M_PIl),
-    TEST_c_c (cacosh, minus_infty, -100, plus_infty, -M_PIl),
+    TEST_c_c (cacosh, minus_infty, 0, plus_infty, lit_pi),
+    TEST_c_c (cacosh, minus_infty, minus_zero, plus_infty, -lit_pi),
+    TEST_c_c (cacosh, minus_infty, 100, plus_infty, lit_pi),
+    TEST_c_c (cacosh, minus_infty, -100, plus_infty, -lit_pi),
 
     TEST_c_c (cacosh, plus_infty, 0, plus_infty, 0.0),
     TEST_c_c (cacosh, plus_infty, minus_zero, plus_infty, minus_zero),
@@ -2833,10 +2835,10 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, plus_zero, 1.5L, 1.194763217287109304111930828519090523536L, lit_pi_2_d),
     TEST_c_c (cacosh, minus_zero, 1.5L, 1.194763217287109304111930828519090523536L, lit_pi_2_d),
 
-    TEST_c_c (cacosh, -1.5L, plus_zero, 0.9624236501192068949955178268487368462704L, M_PIl),
-    TEST_c_c (cacosh, -1.5L, minus_zero, 0.9624236501192068949955178268487368462704L, -M_PIl),
-    TEST_c_c (cacosh, -1.0L, plus_zero, plus_zero, M_PIl),
-    TEST_c_c (cacosh, -1.0L, minus_zero, plus_zero, -M_PIl),
+    TEST_c_c (cacosh, -1.5L, plus_zero, 0.9624236501192068949955178268487368462704L, lit_pi),
+    TEST_c_c (cacosh, -1.5L, minus_zero, 0.9624236501192068949955178268487368462704L, -lit_pi),
+    TEST_c_c (cacosh, -1.0L, plus_zero, plus_zero, lit_pi),
+    TEST_c_c (cacosh, -1.0L, minus_zero, plus_zero, -lit_pi),
     TEST_c_c (cacosh, -0.5L, plus_zero, plus_zero, 2.094395102393195492308428922186335256131L),
     TEST_c_c (cacosh, -0.5L, minus_zero, plus_zero, -2.094395102393195492308428922186335256131L),
     TEST_c_c (cacosh, 0.5L, plus_zero, plus_zero, 1.047197551196597746154214461093167628066L),
@@ -3474,10 +3476,10 @@ static const struct test_c_f_data carg_test_data[] =
     TEST_c_f (carg, 10.0, minus_infty, -lit_pi_2_d),
 
     /* carg (-inf + i y) == +pi for finite y > 0.  */
-    TEST_c_f (carg, minus_infty, 10.0, M_PIl),
+    TEST_c_f (carg, minus_infty, 10.0, lit_pi),
 
     /* carg (-inf + i y) == -pi for finite y < 0.  */
-    TEST_c_f (carg, minus_infty, -10.0, -M_PIl),
+    TEST_c_f (carg, minus_infty, -10.0, -lit_pi),
 
     TEST_c_f (carg, plus_infty, plus_infty, M_PI_4l),
 
@@ -6032,8 +6034,8 @@ static const struct test_f_f_data ceil_test_data[] =
     TEST_f_f (ceil, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 
     /* Bug 15479: spurious "inexact" exception may occur.  */
-    TEST_f_f (ceil, M_PIl, 4.0, ERRNO_UNCHANGED),
-    TEST_f_f (ceil, -M_PIl, -3.0, ERRNO_UNCHANGED),
+    TEST_f_f (ceil, lit_pi, 4.0, ERRNO_UNCHANGED),
+    TEST_f_f (ceil, -lit_pi, -3.0, ERRNO_UNCHANGED),
     TEST_f_f (ceil, min_subnorm_value, 1.0, ERRNO_UNCHANGED),
     TEST_f_f (ceil, min_value, 1.0, ERRNO_UNCHANGED),
     TEST_f_f (ceil, 0.1, 1.0, ERRNO_UNCHANGED),
@@ -6241,8 +6243,8 @@ cimag_test (void)
 
 static const struct test_c_c_data clog_test_data[] =
   {
-    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),
+    TEST_c_c (clog, minus_zero, 0, minus_infty, lit_pi, DIVIDE_BY_ZERO_EXCEPTION),
+    TEST_c_c (clog, minus_zero, minus_zero, minus_infty, -lit_pi, DIVIDE_BY_ZERO_EXCEPTION),
 
     TEST_c_c (clog, 0, 0, minus_infty, 0.0, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (clog, 0, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
@@ -6262,10 +6264,10 @@ static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, minus_zero, minus_infty, plus_infty, -lit_pi_2_d),
     TEST_c_c (clog, -3, minus_infty, plus_infty, -lit_pi_2_d),
 
-    TEST_c_c (clog, minus_infty, 0, plus_infty, M_PIl),
-    TEST_c_c (clog, minus_infty, 1, plus_infty, M_PIl),
-    TEST_c_c (clog, minus_infty, minus_zero, plus_infty, -M_PIl),
-    TEST_c_c (clog, minus_infty, -1, plus_infty, -M_PIl),
+    TEST_c_c (clog, minus_infty, 0, plus_infty, lit_pi),
+    TEST_c_c (clog, minus_infty, 1, plus_infty, lit_pi),
+    TEST_c_c (clog, minus_infty, minus_zero, plus_infty, -lit_pi),
+    TEST_c_c (clog, minus_infty, -1, plus_infty, -lit_pi),
 
     TEST_c_c (clog, plus_infty, 0, plus_infty, 0.0),
     TEST_c_c (clog, plus_infty, 1, plus_infty, 0.0),
@@ -7187,8 +7189,8 @@ static const struct test_f_f_data floor_test_data[] =
     TEST_f_f (floor, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 
     /* Bug 15479: spurious "inexact" exception may occur.  */
-    TEST_f_f (floor, M_PIl, 3.0, ERRNO_UNCHANGED),
-    TEST_f_f (floor, -M_PIl, -4.0, ERRNO_UNCHANGED),
+    TEST_f_f (floor, lit_pi, 3.0, ERRNO_UNCHANGED),
+    TEST_f_f (floor, -lit_pi, -4.0, ERRNO_UNCHANGED),
     TEST_f_f (floor, min_subnorm_value, 0.0, ERRNO_UNCHANGED),
     TEST_f_f (floor, min_value, 0.0, ERRNO_UNCHANGED),
     TEST_f_f (floor, 0.1, 0.0, ERRNO_UNCHANGED),
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc
  2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
                   ` (9 preceding siblings ...)
  2016-05-26 21:53 ` [PATCHv3 10/11] Remove type specific information from auto-libm-test-in Paul E. Murphy
@ 2016-05-26 22:45 ` Paul E. Murphy
  2016-06-03 20:35   ` Joseph Myers
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-26 22:45 UTC (permalink / raw)
  To: libc-alpha

Use gen-libm-test.pl to generate a list of macros
mapping to libm-test-ulps.h as this simplifies adding new
types without having to modify a growing number of
static headers each time a type is added.

This also removes the final usage of the TEST_(DOUBLE|FLOAT|LDOUBLE)
macros.  Thus, they too are removed.

	* math/gen-libm-test.pl (all_floats_pfx): New lookup table.
	(parse_ulps): Dynamically generate type name matching
	string from all_floats.
	(get_ulps): Generate the ulps as an array instead.
	(output_ulps): Dynamically compose the type based
	on the number of supported formats, and print
	the indices as type specific helper macros.

	* math/libm-test.inc: Remove comment about CHOOSE.
	(ulp_data): Generate the type in libm-test-ulps.h.
	(ULP_IDX): New macro.
	(find_ulps): Update usage of max_ulp.

	* math/test-double-vlen2.h (CHOOSE): Remove.
	* math/test-double-vlen4.h (CHOOSE): Likewise.
	* math/test-double-vlen8.h (CHOOSE): Likewise.
	* math/test-float.c (CHOOSE): Likewise.
	* math/test-float-finite.c (CHOOSE): Likewise.
	* math/test-double.c (CHOOSE): Likewise.
	* math/test-double-finite.c (CHOOSE): Likewise.
	* math/test-idouble.c (CHOOSE): Likewise.
	* math/test-ifloat.c (CHOOSE): Likewise.
	* math/test-ildoubl.c (CHOOSE): Likewise.
	* math/test-ldouble-finite.c (CHOOSE): Likewise.
	* math/test-ldouble.c (CHOOSE): Likewise.

	* math/test-float.h (TEST_FLOAT): Remove.
	* math/test-double.h (TEST_DOUBLE): Likewise.
	* math/test-ldouble.h (TEST_LDOUBLE): Likewise.
---
 math/gen-libm-test.pl      | 49 +++++++++++++++++++++++++++++++++++-----------
 math/libm-test.inc         | 13 +++---------
 math/test-double-finite.c  |  1 -
 math/test-double-vlen2.h   |  1 -
 math/test-double-vlen4.h   |  1 -
 math/test-double-vlen8.h   |  1 -
 math/test-double.c         |  1 -
 math/test-double.h         |  1 -
 math/test-float-finite.c   |  1 -
 math/test-float-vlen16.h   |  1 -
 math/test-float-vlen4.h    |  1 -
 math/test-float-vlen8.h    |  1 -
 math/test-float.c          |  1 -
 math/test-float.h          |  1 -
 math/test-idouble.c        |  1 -
 math/test-ifloat.c         |  1 -
 math/test-ildoubl.c        |  1 -
 math/test-ldouble-finite.c |  1 -
 math/test-ldouble.c        |  1 -
 math/test-ldouble.h        |  1 -
 20 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index 30b5406..9fb726d 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -39,7 +39,7 @@ use strict;
 
 use vars qw ($input $output $auto_input);
 use vars qw (%results);
-use vars qw (%beautify @all_floats);
+use vars qw (%beautify @all_floats %all_floats_pfx);
 use vars qw ($output_dir $ulps_file $srcdir);
 use vars qw (%auto_tests);
 
@@ -47,6 +47,13 @@ use vars qw (%auto_tests);
 @all_floats = ('double', 'float', 'idouble',
 	       'ifloat', 'ildouble', 'ldouble');
 
+# all_floats_pfx maps C types to their C like prefix for macros.
+%all_floats_pfx =
+  ( "double" => "DBL",
+    "ldouble" => "LDBL",
+    "float" => "FLT",
+  );
+
 %beautify =
   ( "minus_zero" => "-0",
     "plus_zero" => "+0",
@@ -603,7 +610,14 @@ sub generate_testfile {
 # Parse ulps file
 sub parse_ulps {
   my ($file) = @_;
-  my ($test, $type, $float, $eps);
+  my ($test, $type, $float, $eps, $float_regex);
+
+  # Build a basic regex to match type entries in the
+  # generated ULPS file.
+  foreach my $ftype (@all_floats) {
+    $float_regex .= "|" . $ftype;
+  }
+  $float_regex = "^" . substr ($float_regex, 1) . ":";
 
   # $type has the following values:
   # "normal": No complex variable
@@ -628,7 +642,7 @@ sub parse_ulps {
       ($test) = ($_ =~ /^Function:\s*\"([a-zA-Z0-9_]+)\"/);
       next;
     }
-    if (/^i?(float|double|ldouble):/) {
+    if (/$float_regex/) {
       ($float, $eps) = split /\s*:\s*/,$_,2;
 
       if ($eps eq "0") {
@@ -712,16 +726,13 @@ sub get_ulps {
 sub get_all_ulps_for_test {
   my ($test, $type) = @_;
   my ($ldouble, $double, $float, $ildouble, $idouble, $ifloat);
+  my ($ulps_str);
 
   if (exists $results{$test}{'has_ulps'}) {
-    # XXX use all_floats (change order!)
-    $ldouble = &get_ulps ($test, $type, "ldouble");
-    $double = &get_ulps ($test, $type, "double");
-    $float = &get_ulps ($test, $type, "float");
-    $ildouble = &get_ulps ($test, $type, "ildouble");
-    $idouble = &get_ulps ($test, $type, "idouble");
-    $ifloat = &get_ulps ($test, $type, "ifloat");
-    return "CHOOSE ($ldouble, $double, $float, $ildouble, $idouble, $ifloat)";
+    foreach $float (@all_floats) {
+      $ulps_str .= &get_ulps ($test, $type, $float) . ", ";
+    }
+    return "{" . substr ($ulps_str, 0, -2) . "}";
   } else {
     die "get_all_ulps_for_test called for \"$test\" with no ulps\n";
   }
@@ -739,6 +750,22 @@ sub output_ulps {
   print ULP "   from $ulps_filename with gen-libm-test.pl.\n";
   print ULP "   Don't change it - change instead the master files.  */\n\n";
 
+  print ULP "struct ulp_data\n";
+  print ULP "{\n";
+  print ULP "  const char *name;\n";
+  print ULP "  FLOAT max_ulp[" . @all_floats . "];\n";
+  print ULP "};\n\n";
+
+  for ($i = 0; $i <= $#all_floats; $i++) {
+    $type = $all_floats[$i];
+    print ULP "#define ULP_";
+    if ($type =~ /^i/) {
+      print ULP "I_";
+      $type = substr $type, 1;
+    }
+    print ULP "$all_floats_pfx{$type} $i\n";
+  }
+
   foreach $fct (keys %results) {
     $type = $results{$fct}{'type'};
     if ($type eq 'normal') {
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 5d10460..cb10fa0 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -26,7 +26,6 @@
    name with correct suffix (e.g. cosl or cosf)
    FLOAT:	   floating point type to test
    - TEST_MSG:	   informal message to be displayed
-   CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat):
    chooses one of the parameters as delta for testing
    equality
    PRINTF_EXPR	   Floating point conversion specification to print a variable
@@ -131,14 +130,6 @@
 #include <math-tests.h>
 #include <math-tests-arch.h>
 
-/* Structure for ulp data for a function, or the real or imaginary
-   part of a function.  */
-struct ulp_data
-{
-  const char *name;
-  FLOAT max_ulp;
-};
-
 /* This header defines func_ulps, func_real_ulps and func_imag_ulps
    arrays.  */
 #include "libm-test-ulps.h"
@@ -202,8 +193,10 @@ struct ulp_data
 # define FSTR_MAX (128)
 
 #if TEST_INLINE
+# define ULP_IDX __CONCATX (ULP_I_, PREFIX)
 # define QTYPE_STR "i" TYPE_STR
 #else
+# define ULP_IDX __CONCATX (ULP_, PREFIX)
 # define QTYPE_STR TYPE_STR
 #endif
 
@@ -395,7 +388,7 @@ find_ulps (const char *name, const struct ulp_data *data, size_t nmemb)
   if (entry == NULL)
     return 0;
   else
-    return entry->max_ulp;
+    return entry->max_ulp[ULP_IDX];
 }
 
 static void
diff --git a/math/test-double-finite.c b/math/test-double-finite.c
index e7fa2a9..7f107aa 100644
--- a/math/test-double-finite.c
+++ b/math/test-double-finite.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing double (finite-math-only)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cdouble
 
 #include "libm-test.c"
diff --git a/math/test-double-vlen2.h b/math/test-double-vlen2.h
index 8a1d068..45351cb 100644
--- a/math/test-double-vlen2.h
+++ b/math/test-double-vlen2.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing double vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cdouble
 
 #define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-double-vlen4.h b/math/test-double-vlen4.h
index 40ab58c..7078893 100644
--- a/math/test-double-vlen4.h
+++ b/math/test-double-vlen4.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing double vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cdouble
 
 #define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-double-vlen8.h b/math/test-double-vlen8.h
index dddb52c..57168c5 100644
--- a/math/test-double-vlen8.h
+++ b/math/test-double-vlen8.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing double vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cdouble
 
 #define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-double.c b/math/test-double.c
index 2647f66..3f84f40 100644
--- a/math/test-double.c
+++ b/math/test-double.c
@@ -23,6 +23,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing double (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cdouble
 
 #include "libm-test.c"
diff --git a/math/test-double.h b/math/test-double.h
index 3667883..b9e8cd8 100644
--- a/math/test-double.h
+++ b/math/test-double.h
@@ -21,7 +21,6 @@
 #define PRINTF_EXPR "e"
 #define PRINTF_XEXPR "a"
 #define PRINTF_NEXPR "f"
-#define TEST_DOUBLE 1
 #define BUILD_COMPLEX(real, imag) (CMPLX ((real), (imag)))
 #define PREFIX DBL
 #define LIT(x) (x)
diff --git a/math/test-float-finite.c b/math/test-float-finite.c
index bd25a7b..3f5fe19 100644
--- a/math/test-float-finite.c
+++ b/math/test-float-finite.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing float (finite-math-only)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cfloat
 
 #include "libm-test.c"
diff --git a/math/test-float-vlen16.h b/math/test-float-vlen16.h
index a2db3a5..d31336a 100644
--- a/math/test-float-vlen16.h
+++ b/math/test-float-vlen16.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing float vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cfloat
 
 #define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-float-vlen4.h b/math/test-float-vlen4.h
index 164749d..5a88fb8 100644
--- a/math/test-float-vlen4.h
+++ b/math/test-float-vlen4.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing float vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cfloat
 
 #define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-float-vlen8.h b/math/test-float-vlen8.h
index ce32df2..d1e5e6e 100644
--- a/math/test-float-vlen8.h
+++ b/math/test-float-vlen8.h
@@ -21,7 +21,6 @@
 #include "test-math-vector.h"
 
 #define TEST_MSG "testing float vector math (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cfloat
 
 #define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
diff --git a/math/test-float.c b/math/test-float.c
index 153b9ad..6be57bb 100644
--- a/math/test-float.c
+++ b/math/test-float.c
@@ -23,6 +23,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing float (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cfloat
 
 #include "libm-test.c"
diff --git a/math/test-float.h b/math/test-float.h
index 4f9149f..e783c09 100644
--- a/math/test-float.h
+++ b/math/test-float.h
@@ -21,7 +21,6 @@
 #define PRINTF_EXPR "e"
 #define PRINTF_XEXPR "a"
 #define PRINTF_NEXPR "f"
-#define TEST_FLOAT 1
 #define BUILD_COMPLEX(real, imag) (CMPLXF ((real), (imag)))
 #define PREFIX FLT
 #define TYPE_STR "float"
diff --git a/math/test-idouble.c b/math/test-idouble.c
index fc1e8f8..10a3685 100644
--- a/math/test-idouble.c
+++ b/math/test-idouble.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing double (inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cinlinedouble
 
 #include "libm-test.c"
diff --git a/math/test-ifloat.c b/math/test-ifloat.c
index 72c53ad..88bb5b8 100644
--- a/math/test-ifloat.c
+++ b/math/test-ifloat.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing float (inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cinlinefloat
 
 #include "libm-test.c"
diff --git a/math/test-ildoubl.c b/math/test-ildoubl.c
index 08317ed..dc0efaa 100644
--- a/math/test-ildoubl.c
+++ b/math/test-ildoubl.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing long double (inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Cinlinelongdouble
 
 #include "libm-test.c"
diff --git a/math/test-ldouble-finite.c b/math/test-ldouble-finite.c
index 4c09778..8ac2d33 100644
--- a/math/test-ldouble-finite.c
+++ b/math/test-ldouble-finite.c
@@ -21,6 +21,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing long double (finite-math-only)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Clongdouble
 
 #include "libm-test.c"
diff --git a/math/test-ldouble.c b/math/test-ldouble.c
index 944f6dd..a705fa4 100644
--- a/math/test-ldouble.c
+++ b/math/test-ldouble.c
@@ -23,6 +23,5 @@
 #include "test-math-scalar.h"
 
 #define TEST_MSG "testing long double (without inline functions)\n"
-#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Clongdouble
 
 #include "libm-test.c"
diff --git a/math/test-ldouble.h b/math/test-ldouble.h
index f3a8d8d..b877711 100644
--- a/math/test-ldouble.h
+++ b/math/test-ldouble.h
@@ -21,7 +21,6 @@
 #define PRINTF_EXPR "Le"
 #define PRINTF_XEXPR "La"
 #define PRINTF_NEXPR "Lf"
-#define TEST_LDOUBLE 1
 #define BUILD_COMPLEX(real, imag) (CMPLXL ((real), (imag)))
 #define PREFIX LDBL
 #define TYPE_STR "ldouble"
-- 
2.4.11

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 01/11] Begin refactor of libm-test.inc
  2016-05-26 21:43 ` [PATCHv3 01/11] Begin refactor of libm-test.inc Paul E. Murphy
@ 2016-05-26 22:56   ` Joseph Myers
  2016-05-27 15:09     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-26 22:56 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> +/* Maximum character buffer to store a stringitized FLOAT value.  */
> +# define FSTR_MAX (128)

No space after '#', as this isn't inside a preprocessor conditional.

OK with that change, *but* please note:

> @@ -428,8 +432,12 @@ print_float (FLOAT f)
>    else if (isnan (f))
>      printf ("qNaN\n");
>    else
> -    printf ("% .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR "\n",
> -	    TYPE_DECIMAL_DIG - 1, f, TYPE_HEX_DIG - 1, f);
> +    {
> +      char fstrn[FSTR_MAX], fstrx[FSTR_MAX];
> +      FTOSTR (fstrn, FSTR_MAX, "% .*" PRINTF_EXPR, TYPE_DECIMAL_DIG - 1, f);
> +      FTOSTR (fstrx, FSTR_MAX, "% .*" PRINTF_XEXPR, TYPE_HEX_DIG - 1, f);
> +      printf ("%s  %s\n", fstrn, fstrx);
> +    }

This won't actually work for strfromf128, only snprintf.  strfrom 
functions don't take printf flags (' ') here, or '*' as precision.  So 
there is more work to do to adapt this to generate strings in a way that 
will actually work for float128.

> @@ -851,10 +865,17 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
>        print_float (expected);
>        if (print_diff)
>  	{
> -	  printf (" difference: % .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR
> -		  "\n", TYPE_DECIMAL_DIG - 1, diff, TYPE_HEX_DIG - 1, diff);
> -	  printf (" ulp       : % .4" PRINTF_NEXPR "\n", ulps);
> -	  printf (" max.ulp   : % .4" PRINTF_NEXPR "\n", max_ulp);
> +	  char dstrn[FSTR_MAX], dstrx[FSTR_MAX];
> +	  char ustrn[FSTR_MAX], mustrn[FSTR_MAX];
> +	  FTOSTR (dstrn, FSTR_MAX, "% .*" PRINTF_EXPR,
> +		  TYPE_DECIMAL_DIG - 1, diff);
> +	  FTOSTR (dstrx, FSTR_MAX, "% .*" PRINTF_XEXPR,
> +		  TYPE_HEX_DIG - 1, diff);
> +	  FTOSTR (ustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, ulps);
> +	  FTOSTR (mustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, max_ulp);

Again, using printf ' ' flag isn't valid for strfrom functions.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 02/11] Refactor type specific macros using regexes
  2016-05-26 21:43 ` [PATCHv3 02/11] Refactor type specific macros using regexes Paul E. Murphy
@ 2016-05-26 22:59   ` Joseph Myers
  2016-05-27 15:28     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-26 22:59 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> Replace most of the type specific macros  with the equivalent
> type-generic macro using the following sed replacement command below:
> 
> sed -ri -e 's/defined TEST_FLOAT/TEST_COND_binary32/' \
>         -e 's/ndef TEST_FLOAT/ !TEST_COND_binary32/'  \
>         -e 's/def TEST_FLOAT/ TEST_COND_binary32/'    \
>         -e 's/defined TEST_DOUBLE/TEST_COND_binary64/'\
>         -e 's/ndef TEST_DOUBLE/ !TEST_COND_binary64/' \
>         -e 's/def TEST_DOUBLE/ TEST_COND_binary64/'   \
>         -e 's/defined TEST_LDOUBLE && //'             \
>         -e 's/ifdef TEST_LDOUBLE/if MANT_DIG >= 64/'  \
>         -e 's/defined TEST_LDOUBLE/MANT_DIG >= 64/'   \
>         -e '/nexttoward_test_data\[\]/,/  };/!s/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/\1/g' \
>         libm-test.inc
> 
> With a little extra manual cleanup to simplify the following case:
> 
> #if MANT_DIG >= 64
> # if MANT_DIG >= 64
> ...
> # endif
> ...
> 
> Note, TEST_LDOUBLE checks are replaced by MANT_DIG >= 64 excepting
> where another property of the type is being tested. And, the final
> regex is intended to avoid replacing LDBL_ macro usage within the
> nexttoward tests which explicitly take argument 2 as long double.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc
  2016-05-26 21:43 ` [PATCHv3 03/11] Refactor M_ macros defined " Paul E. Murphy
@ 2016-05-27  8:43   ` Joseph Myers
  2016-05-27 16:08     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27  8:43 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> +/* (pi * 3 * ln(10) / 4 */
> +#define lit_pi_3_m_ln10_m_4_d	LIT (1.023282265381381010614337719073516828)

You're missing a ')' in the comment.  And, the comment, and thus the macro 
name according to your scheme, are inaccurate; this one involves dividing 
by ln(10), not multiplying by it (all the ln(10) ones are for clog10 
expectations).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc
  2016-05-26 21:43 ` [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc Paul E. Murphy
@ 2016-05-27 13:32   ` Joseph Myers
  2016-05-27 17:12     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 13:32 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> This is useful in situations where the long double type is
> less precise than the type under test.  This adds a new
> wrapper macro LITM(x) to each type to append the proper
> suffix onto macro constants found in math.h.
> 
> 	* libm-test.inc: Replace usage of M_PI2l with
> 	(lit_pi_2_d): New macro.
> 
> 	* math/test-double.h (LITM): New macro.
> 	* math/test-float.h (LITM): Likewise.
> 	* math/test-ldouble.h (LITM): Likewise.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 05/11] Replace M_PIl with lit_pi in libm-test.inc
  2016-05-26 21:53 ` [PATCHv3 05/11] Replace M_PIl with lit_pi " Paul E. Murphy
@ 2016-05-27 13:33   ` Joseph Myers
  2016-05-27 17:13     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 13:33 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> This is useful in situations where the long double type is
> less precise than the type under test.
> 
> 	* libm-test.inc: Replace usage of M_PIl with
> 	(lit_pi): New macro.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc
  2016-05-26 21:43 ` [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc Paul E. Murphy
@ 2016-05-27 13:35   ` Joseph Myers
  2016-05-27 17:13     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 13:35 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> This is useful in situations where the long double type is
> less precise than the type under test.
> 
> 	* libm-test.inc: Replace usage of M_PI_4l with
> 	(lit_pi_4_d): New macro.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 07/11] Replace M_El with lit_e in libm-test.inc
  2016-05-26 21:43 ` [PATCHv3 07/11] Replace M_El with lit_e " Paul E. Murphy
@ 2016-05-27 14:00   ` Joseph Myers
  2016-05-27 17:24     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 14:00 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> This is useful in situations where the long double type is
> less precise than the type under test.
> 
>     	* libm-test.inc: Replace usage of M_El with
>     	(lit_e): New macro.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 01/11] Begin refactor of libm-test.inc
  2016-05-26 22:56   ` Joseph Myers
@ 2016-05-27 15:09     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 15:09 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/26/2016 05:45 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> +/* Maximum character buffer to store a stringitized FLOAT value.  */
>> +# define FSTR_MAX (128)
> 
> No space after '#', as this isn't inside a preprocessor conditional.
> 
> OK with that change, *but* please note:

Fixed.

> 
>> @@ -428,8 +432,12 @@ print_float (FLOAT f)
>>    else if (isnan (f))
>>      printf ("qNaN\n");
>>    else
>> -    printf ("% .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR "\n",
>> -	    TYPE_DECIMAL_DIG - 1, f, TYPE_HEX_DIG - 1, f);
>> +    {
>> +      char fstrn[FSTR_MAX], fstrx[FSTR_MAX];
>> +      FTOSTR (fstrn, FSTR_MAX, "% .*" PRINTF_EXPR, TYPE_DECIMAL_DIG - 1, f);
>> +      FTOSTR (fstrx, FSTR_MAX, "% .*" PRINTF_XEXPR, TYPE_HEX_DIG - 1, f);
>> +      printf ("%s  %s\n", fstrn, fstrx);
>> +    }
> 
> This won't actually work for strfromf128, only snprintf.  strfrom 
> functions don't take printf flags (' ') here, or '*' as precision.  So 
> there is more work to do to adapt this to generate strings in a way that 
> will actually work for float128.
> 
>> @@ -851,10 +865,17 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
>>        print_float (expected);
>>        if (print_diff)
>>  	{
>> -	  printf (" difference: % .*" PRINTF_EXPR "  % .*" PRINTF_XEXPR
>> -		  "\n", TYPE_DECIMAL_DIG - 1, diff, TYPE_HEX_DIG - 1, diff);
>> -	  printf (" ulp       : % .4" PRINTF_NEXPR "\n", ulps);
>> -	  printf (" max.ulp   : % .4" PRINTF_NEXPR "\n", max_ulp);
>> +	  char dstrn[FSTR_MAX], dstrx[FSTR_MAX];
>> +	  char ustrn[FSTR_MAX], mustrn[FSTR_MAX];
>> +	  FTOSTR (dstrn, FSTR_MAX, "% .*" PRINTF_EXPR,
>> +		  TYPE_DECIMAL_DIG - 1, diff);
>> +	  FTOSTR (dstrx, FSTR_MAX, "% .*" PRINTF_XEXPR,
>> +		  TYPE_HEX_DIG - 1, diff);
>> +	  FTOSTR (ustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, ulps);
>> +	  FTOSTR (mustrn, FSTR_MAX, "% .4" PRINTF_NEXPR, max_ulp);
> 
> Again, using printf ' ' flag isn't valid for strfrom functions.

Indeed. TS 18661's dereliction of printf and company is annoying, but kind of
understandable.  Anyhow, I've also updated the change log to note that it
*almost* enables dropin replacement.

Committed as 5f7b8f4.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 02/11] Refactor type specific macros using regexes
  2016-05-26 22:59   ` Joseph Myers
@ 2016-05-27 15:28     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 15:28 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

Committed as de62889.

On 05/26/2016 05:56 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> Replace most of the type specific macros  with the equivalent
>> type-generic macro using the following sed replacement command below:
>>
>> sed -ri -e 's/defined TEST_FLOAT/TEST_COND_binary32/' \
>>         -e 's/ndef TEST_FLOAT/ !TEST_COND_binary32/'  \
>>         -e 's/def TEST_FLOAT/ TEST_COND_binary32/'    \
>>         -e 's/defined TEST_DOUBLE/TEST_COND_binary64/'\
>>         -e 's/ndef TEST_DOUBLE/ !TEST_COND_binary64/' \
>>         -e 's/def TEST_DOUBLE/ TEST_COND_binary64/'   \
>>         -e 's/defined TEST_LDOUBLE && //'             \
>>         -e 's/ifdef TEST_LDOUBLE/if MANT_DIG >= 64/'  \
>>         -e 's/defined TEST_LDOUBLE/MANT_DIG >= 64/'   \
>>         -e '/nexttoward_test_data\[\]/,/  };/!s/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/\1/g' \
>>         libm-test.inc
>>
>> With a little extra manual cleanup to simplify the following case:
>>
>> #if MANT_DIG >= 64
>> # if MANT_DIG >= 64
>> ...
>> # endif
>> ...
>>
>> Note, TEST_LDOUBLE checks are replaced by MANT_DIG >= 64 excepting
>> where another property of the type is being tested. And, the final
>> regex is intended to avoid replacing LDBL_ macro usage within the
>> nexttoward tests which explicitly take argument 2 as long double.
> 
> OK.
> 

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc
  2016-05-27  8:43   ` Joseph Myers
@ 2016-05-27 16:08     ` Paul E. Murphy
  2016-05-27 17:12       ` Joseph Myers
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 16:08 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

On 05/26/2016 06:14 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> +/* (pi * 3 * ln(10) / 4 */
>> +#define lit_pi_3_m_ln10_m_4_d	LIT (1.023282265381381010614337719073516828)
> 
> You're missing a ')' in the comment.  And, the comment, and thus the macro 
> name according to your scheme, are inaccurate; this one involves dividing 
> by ln(10), not multiplying by it (all the ln(10) ones are for clog10 
> expectations).
> 

Very wrong indeed.  Let me fix it with:

+/* pi * 3 / (4 * ln(10)) */
+#define lit_pi_3_m_4_ln10_m_d  LIT (1.023282265381381010614337719073516828)

Likewise, the updated comment above all of them read poorly.

+/* Various constants derived from pi.  We must supply them precalculated for
+   accuracy.  They are written as a series of postfix operations to keep
+   them concise yet somewhat readable.  */

The updated patch is attached.  I'd prefer to get this approved and committed
before committing the other M_ -> lit_ changes.

[-- Attachment #2: 0001-Refactor-M_-macros-defined-in-libm-test.inc.patch --]
[-- Type: text/x-patch, Size: 8764 bytes --]

From 6561a219b9e6c67e49a5154f188004ae1552b46c Mon Sep 17 00:00:00 2001
From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
Date: Fri, 20 May 2016 09:46:39 -0500
Subject: [PATCH 1/9] Refactor M_ macros defined in libm-test.inc

These are local to the test suite.  Rename them as a macro starting
with lit_pi and a series of postfix operations to give us a constant
starting with lit_pi.

The lit prefix is intended to enable easy substitutions via
gen-test-libm.pl if needed.

	* libm-test.inc (M_PI_6l) Rename to
	(lit_pi_6_d): New Macro.
	(M_PI_34l): Rename to
	(lit_pi_3_m_4_d): New Macro.
	(M_PI_34_LOG10El): Rename to
	(lit_pi_3_m_4_ln10_m_d): New Macro.
	(M_PI2_LOG10El): Rename to
	(lit_pi_2_ln10_m_d):  New Macro.
	(M_PI4_LOG10El): Rename to
	(lit_pi_4_ln10_m_d):  New Macro.
	(M_PI_LOG10El): Rename to
	(lit_pi_ln10_d):  New Macro.
---
 math/libm-test.inc | 77 ++++++++++++++++++++++++++++++------------------------
 1 file changed, 43 insertions(+), 34 deletions(-)

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 9c75a01..c27f3cd 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -305,13 +305,22 @@ struct ulp_data
 # define TEST_COND_x86		0
 #endif
 
-/* Various constants (we must supply them precalculated for accuracy).  */
-#define M_PI_6l			.52359877559829887307710723054658383L
-#define M_PI_34l		2.356194490192344928846982537459627163L	/* 3*pi/4 */
-#define M_PI_34_LOG10El		1.023282265381381010614337719073516828L
-#define M_PI2_LOG10El		0.682188176920920673742891812715677885L
-#define M_PI4_LOG10El		0.341094088460460336871445906357838943L
-#define M_PI_LOG10El		1.364376353841841347485783625431355770L
+/* Various constants derived from pi.  We must supply them precalculated for
+   accuracy.  They are written as a series of postfix operations to keep
+   them concise yet somewhat readable.  */
+
+/* pi / 6 */
+#define lit_pi_6_d		LIT (.52359877559829887307710723054658383)
+/* (pi * 3) / 4 */
+#define lit_pi_3_m_4_d		LIT (2.356194490192344928846982537459627163)
+/* pi * 3 / (4 * ln(10)) */
+#define lit_pi_3_m_4_ln10_m_d	LIT (1.023282265381381010614337719073516828)
+/* pi / (2 * ln(10)) */
+#define lit_pi_2_ln10_m_d	LIT (0.682188176920920673742891812715677885)
+/* pi / (4 * ln(10)) */
+#define lit_pi_4_ln10_m_d	LIT (0.341094088460460336871445906357838943)
+/* pi / ln(10) */
+#define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
 
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
@@ -1989,8 +1998,8 @@ static const struct test_ff_f_data atan2_test_data[] =
 
     TEST_ff_f (atan2, plus_infty, plus_infty, M_PI_4l, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, plus_infty, minus_infty, M_PI_34l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, minus_infty, lit_pi_3_m_4_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, minus_infty, -lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_ff_f (atan2, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -2082,8 +2091,8 @@ static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, minus_zero, minus_zero, M_PI_2l, 0.0),
     TEST_c_c (cacos, 0, minus_zero, M_PI_2l, 0.0),
 
-    TEST_c_c (cacos, minus_infty, plus_infty, M_PI_34l, minus_infty),
-    TEST_c_c (cacos, minus_infty, minus_infty, M_PI_34l, plus_infty),
+    TEST_c_c (cacos, minus_infty, plus_infty, lit_pi_3_m_4_d, minus_infty),
+    TEST_c_c (cacos, minus_infty, minus_infty, lit_pi_3_m_4_d, plus_infty),
 
     TEST_c_c (cacos, plus_infty, plus_infty, M_PI_4l, minus_infty),
     TEST_c_c (cacos, plus_infty, minus_infty, M_PI_4l, plus_infty),
@@ -2769,8 +2778,8 @@ static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, minus_zero, 0, 0.0, M_PI_2l),
     TEST_c_c (cacosh, 0, minus_zero, 0.0, -M_PI_2l),
     TEST_c_c (cacosh, minus_zero, minus_zero, 0.0, -M_PI_2l),
-    TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, M_PI_34l),
-    TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -M_PI_34l),
+    TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
+    TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
@@ -3472,9 +3481,9 @@ static const struct test_c_f_data carg_test_data[] =
 
     TEST_c_f (carg, plus_infty, minus_infty, -M_PI_4l),
 
-    TEST_c_f (carg, minus_infty, plus_infty, M_PI_34l),
+    TEST_c_f (carg, minus_infty, plus_infty, lit_pi_3_m_4_d),
 
-    TEST_c_f (carg, minus_infty, minus_infty, -M_PI_34l),
+    TEST_c_f (carg, minus_infty, minus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_f (carg, qnan_value, qnan_value, qnan_value),
 
@@ -6236,8 +6245,8 @@ static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, 0, 0, minus_infty, 0.0, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (clog, 0, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
 
-    TEST_c_c (clog, minus_infty, plus_infty, plus_infty, M_PI_34l),
-    TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -M_PI_34l),
+    TEST_c_c (clog, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
+    TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
     TEST_c_c (clog, plus_infty, plus_infty, plus_infty, M_PI_4l),
     TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -M_PI_4l),
@@ -6291,30 +6300,30 @@ clog_test (void)
 
 static const struct test_c_c_data clog10_test_data[] =
   {
-    TEST_c_c (clog10, minus_zero, 0, minus_infty, M_PI_LOG10El, DIVIDE_BY_ZERO_EXCEPTION),
-    TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -M_PI_LOG10El, DIVIDE_BY_ZERO_EXCEPTION),
+    TEST_c_c (clog10, minus_zero, 0, minus_infty, lit_pi_ln10_d, DIVIDE_BY_ZERO_EXCEPTION),
+    TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -lit_pi_ln10_d, DIVIDE_BY_ZERO_EXCEPTION),
 
     TEST_c_c (clog10, 0, 0, minus_infty, 0.0, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (clog10, 0, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
 
-    TEST_c_c (clog10, minus_infty, plus_infty, plus_infty, M_PI_34_LOG10El),
+    TEST_c_c (clog10, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_ln10_m_d),
 
-    TEST_c_c (clog10, plus_infty, plus_infty, plus_infty, M_PI4_LOG10El),
-    TEST_c_c (clog10, plus_infty, minus_infty, plus_infty, -M_PI4_LOG10El),
+    TEST_c_c (clog10, plus_infty, plus_infty, plus_infty, lit_pi_4_ln10_m_d),
+    TEST_c_c (clog10, plus_infty, minus_infty, plus_infty, -lit_pi_4_ln10_m_d),
 
-    TEST_c_c (clog10, 0, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, 3, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, minus_zero, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, -3, plus_infty, plus_infty, M_PI2_LOG10El),
-    TEST_c_c (clog10, 0, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, 3, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, minus_zero, minus_infty, plus_infty, -M_PI2_LOG10El),
-    TEST_c_c (clog10, -3, minus_infty, plus_infty, -M_PI2_LOG10El),
+    TEST_c_c (clog10, 0, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 3, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, minus_zero, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, -3, plus_infty, plus_infty, lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 0, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, 3, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, minus_zero, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
+    TEST_c_c (clog10, -3, minus_infty, plus_infty, -lit_pi_2_ln10_m_d),
 
-    TEST_c_c (clog10, minus_infty, 0, plus_infty, M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, 1, plus_infty, M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, minus_zero, plus_infty, -M_PI_LOG10El),
-    TEST_c_c (clog10, minus_infty, -1, plus_infty, -M_PI_LOG10El),
+    TEST_c_c (clog10, minus_infty, 0, plus_infty, lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, 1, plus_infty, lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, minus_zero, plus_infty, -lit_pi_ln10_d),
+    TEST_c_c (clog10, minus_infty, -1, plus_infty, -lit_pi_ln10_d),
 
     TEST_c_c (clog10, plus_infty, 0, plus_infty, 0.0),
     TEST_c_c (clog10, plus_infty, 1, plus_infty, 0.0),
-- 
2.4.11


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc
  2016-05-27 13:32   ` Joseph Myers
@ 2016-05-27 17:12     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 17:12 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 08:31 AM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> This is useful in situations where the long double type is
>> less precise than the type under test.  This adds a new
>> wrapper macro LITM(x) to each type to append the proper
>> suffix onto macro constants found in math.h.
>>
>> 	* libm-test.inc: Replace usage of M_PI2l with
>> 	(lit_pi_2_d): New macro.
>>
>> 	* math/test-double.h (LITM): New macro.
>> 	* math/test-float.h (LITM): Likewise.
>> 	* math/test-ldouble.h (LITM): Likewise.
> 
> OK.
> 

Committed as 84ba459.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc
  2016-05-27 16:08     ` Paul E. Murphy
@ 2016-05-27 17:12       ` Joseph Myers
  2016-05-27 17:12         ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 17:12 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Fri, 27 May 2016, Paul E. Murphy wrote:

> The updated patch is attached.  I'd prefer to get this approved and committed
> before committing the other M_ -> lit_ changes.

You need to update this for my removal of M_PI_6l as unused.  OK with that 
change.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc
  2016-05-27 17:12       ` Joseph Myers
@ 2016-05-27 17:12         ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 17:12 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 11:08 AM, Joseph Myers wrote:
> On Fri, 27 May 2016, Paul E. Murphy wrote:
> 
>> The updated patch is attached.  I'd prefer to get this approved and committed
>> before committing the other M_ -> lit_ changes.
> 
> You need to update this for my removal of M_PI_6l as unused.  OK with that 
> change.
> 

Removed and committed as 135d1c7.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc
  2016-05-27 13:35   ` Joseph Myers
@ 2016-05-27 17:13     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 17:13 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 08:33 AM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> This is useful in situations where the long double type is
>> less precise than the type under test.
>>
>> 	* libm-test.inc: Replace usage of M_PI_4l with
>> 	(lit_pi_4_d): New macro.
> 
> OK.
> 

Committed as 9513192.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 05/11] Replace M_PIl with lit_pi in libm-test.inc
  2016-05-27 13:33   ` Joseph Myers
@ 2016-05-27 17:13     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 17:13 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 08:32 AM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> This is useful in situations where the long double type is
>> less precise than the type under test.
>>
>> 	* libm-test.inc: Replace usage of M_PIl with
>> 	(lit_pi): New macro.
> 
> OK.
> 

Committed as 9289b55.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 07/11] Replace M_El with lit_e in libm-test.inc
  2016-05-27 14:00   ` Joseph Myers
@ 2016-05-27 17:24     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 17:24 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 08:35 AM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> This is useful in situations where the long double type is
>> less precise than the type under test.
>>
>>     	* libm-test.inc: Replace usage of M_El with
>>     	(lit_e): New macro.
> 
> OK.
> 

Committed as f64f68f.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-26 21:43 ` [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c Paul E. Murphy
@ 2016-05-27 17:32   ` Joseph Myers
  2016-05-27 18:16     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 17:32 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> +# Apply a prefix and suffix to a floating point value after
> +# stripping the suffix, or return the unaltered string.
> +sub wrap_lit {
> +  my ($lit,$prefix,$suffix) = @_;

Use spaces after commas.

> +  # base 10 integer raised to a power,

I think you mean base 10 integer with an exponent / times 10 to a 
power....

> +      } elsif ($descr[$i] eq "j") {
> +        $cline .= ", " . &apply_suf ($args[$current_arg], "L");

I don't see a use in replacing suffixes for the long double argument to 
nexttoward.  I'd just expect the source file to have the right suffix if 
needed and leave it unchanged, as for integer arguments.  (This then means 
apply_suf is unneeded.)

> +	} elsif ($_ eq "j") {
> +          $result = apply_suf ($result, "L");

Likewise.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-27 17:32   ` Joseph Myers
@ 2016-05-27 18:16     ` Paul E. Murphy
  2016-05-27 19:51       ` Joseph Myers
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 18:16 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha



On 05/27/2016 12:24 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> +# Apply a prefix and suffix to a floating point value after
>> +# stripping the suffix, or return the unaltered string.
>> +sub wrap_lit {
>> +  my ($lit,$prefix,$suffix) = @_;
> 
> Use spaces after commas.
> 
>> +  # base 10 integer raised to a power,
> 
> I think you mean base 10 integer with an exponent / times 10 to a 
> power....
> 
>> +      } elsif ($descr[$i] eq "j") {
>> +        $cline .= ", " . &apply_suf ($args[$current_arg], "L");
> 
> I don't see a use in replacing suffixes for the long double argument to 
> nexttoward.  I'd just expect the source file to have the right suffix if 
> needed and leave it unchanged, as for integer arguments.  (This then means 
> apply_suf is unneeded.)

Ok, so the new option can be generalized to one which does not attempt to
fixup an FP literal.

Likewise, I assume wrap_lit should be squashed with apply_lit.

> 
>> +	} elsif ($_ eq "j") {
>> +          $result = apply_suf ($result, "L");
> 
> Likewise.
> 

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-27 18:16     ` Paul E. Murphy
@ 2016-05-27 19:51       ` Joseph Myers
  2016-05-27 21:42         ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-05-27 19:51 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Fri, 27 May 2016, Paul E. Murphy wrote:

> Ok, so the new option can be generalized to one which does not attempt to
> fixup an FP literal.
> 
> Likewise, I assume wrap_lit should be squashed with apply_lit.

Yes.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-27 19:51       ` Joseph Myers
@ 2016-05-27 21:42         ` Paul E. Murphy
  2016-06-03 20:24           ` Joseph Myers
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. Murphy @ 2016-05-27 21:42 UTC (permalink / raw)
  To: libc-alpha; +Cc: Joseph Myers

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]



On 05/27/2016 02:49 PM, Joseph Myers wrote:
> On Fri, 27 May 2016, Paul E. Murphy wrote:
> 
>> Ok, so the new option can be generalized to one which does not attempt to
>> fixup an FP literal.
>>
>> Likewise, I assume wrap_lit should be squashed with apply_lit.
> 
> Yes.
> 

Here is an updated patch with such changes.

[-- Attachment #2: 0001-Apply-LIT-x-to-floating-point-literals-in-libm-test..patch --]
[-- Type: text/x-patch, Size: 24364 bytes --]

From 5c7445fa99773862a3b8216aa977c362a0a16242 Mon Sep 17 00:00:00 2001
From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
Date: Fri, 27 May 2016 15:37:19 -0500
Subject: [PATCH 1/3] Apply LIT(x) to floating point literals in libm-test.c

With the exception of the second argument of nexttoward,
any suffixes should be stripped from the test input, and
the macro LIT(x) should be applied to use the correct
suffix for the type being tested.

This adds a new argument type "j" to gen-test-libm.pl
to signify an argument to a test input which does not
require fixup.  The test cases of nexttoward have
been updated to use this new feature.

This applies post-processing to all of the test inputs
through gen-libm-test.pl to strip literal suffixes and
apply the LIT(x) macro, with one exception stated above.
This seems a bit cleaner than tossing the macro onto
everything, albeit slightly more obfuscated.

	* math/gen-libm-test.pl: (apply_lit): New subroutine.
	(parse_args): Strip C suffix from floating point literals
	typed with 'f' and wrap them with LIT().

	* math/libm-tests.inc (RUN_TEST_LOOP_fj_f): New macro.
	(test_ff_f_data_nexttoward): Rename to
	(test_fj_f_data): New struct.
	(nexttoward_test_data): Relabel tests as
	TEST_fj_f instead of TEST_ff_f.
---
 math/gen-libm-test.pl |  41 +++++++++--
 math/libm-test.inc    | 186 ++++++++++++++++++++++++++------------------------
 2 files changed, 132 insertions(+), 95 deletions(-)

diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index c42a53b..2f3b46e 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -153,6 +153,25 @@ sub show_exceptions {
   }
 }
 
+# Apply the LIT(x) macro to a literal floating point constant
+# and strip any existing suffix.
+sub apply_lit {
+  my ($lit) = @_;
+  my $exp_re = "([+-])?[[:digit:]]+";
+  # Don't wrap something that does not look like a:
+  #  * Hexadecimal FP value
+  #  * Decimal FP value without a decimal point
+  #  * Decimal value with a fraction
+  return $lit if $lit !~ /([+-])?0x[[:xdigit:]\.]+[pP]$exp_re/
+      		 and $lit !~ /[[:digit:]]+[eE]$exp_re/
+      		 and $lit !~ /[[:digit:]]*\.[[:digit:]]*([eE]$exp_re)?/;
+
+  # Strip any existing literal suffix.
+  $lit =~ s/[lLfF]$//;
+
+  return "LIT (${lit})";
+}
+
 # Parse the arguments to TEST_x_y
 sub parse_args {
   my ($file, $descr, $args) = @_;
@@ -182,7 +201,7 @@ sub parse_args {
       $comma = ', ';
     }
     # FLOAT, int, long int, long long int
-    if ($descr[$i] =~ /f|i|l|L/) {
+    if ($descr[$i] =~ /f|j|i|l|L/) {
       $call_args .= $comma . &beautify ($args[$current_arg]);
       ++$current_arg;
       next;
@@ -242,8 +261,12 @@ sub parse_args {
   @descr = split //,$descr_args;
   for ($i=0; $i <= $#descr; $i++) {
     # FLOAT, int, long int, long long int
-    if ($descr[$i] =~ /f|i|l|L/) {
-      $cline .= ", $args[$current_arg]";
+    if ($descr[$i] =~ /f|j|i|l|L/) {
+      if ($descr[$i] eq "f") {
+        $cline .= ", " . &apply_lit ($args[$current_arg]);
+      } else {
+        $cline .= ", $args[$current_arg]";
+      }
       $current_arg++;
       next;
     }
@@ -253,7 +276,8 @@ sub parse_args {
     }
     # complex
     if ($descr[$i] eq 'c') {
-      $cline .= ", $args[$current_arg], $args[$current_arg+1]";
+      $cline .= ", " . &apply_lit ($args[$current_arg]);
+      $cline .= ", " . &apply_lit ($args[$current_arg+1]);
       $current_arg += 2;
       next;
     }
@@ -275,7 +299,7 @@ sub parse_args {
     $cline_res = "";
     @special = ();
     foreach (@descr) {
-      if ($_ =~ /b|f|i|l|L/ ) {
+      if ($_ =~ /b|f|j|i|l|L/ ) {
 	my ($result) = $args_res[$current_arg];
 	if ($result eq "IGNORE") {
 	  $ignore_result_any = 1;
@@ -283,6 +307,9 @@ sub parse_args {
 	} else {
 	  $ignore_result_all = 0;
 	}
+	if ($_ eq "f") {
+	  $result = apply_lit ($result);
+	}
 	$cline_res .= ", $result";
 	$current_arg++;
       } elsif ($_ eq 'c') {
@@ -300,6 +327,8 @@ sub parse_args {
 	} else {
 	  $ignore_result_all = 0;
 	}
+	$result1 = apply_lit ($result1);
+	$result2 = apply_lit ($result2);
 	$cline_res .= ", $result1, $result2";
 	$current_arg += 2;
       } elsif ($_ eq '1') {
@@ -330,6 +359,8 @@ sub parse_args {
       my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
       if (!$run_extra) {
 	$extra_expected = "0";
+      } else {
+	$extra_expected = apply_lit ($extra_expected);
       }
       $cline_res .= ", $run_extra, $extra_expected";
     }
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 8c64c8e..bf22413 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1092,7 +1092,10 @@ struct test_ff_f_data
     int exceptions;
   } rd, rn, rz, ru;
 };
-struct test_ff_f_data_nexttoward
+/* Strictly speaking, a j type argument is one gen-libm-test.pl will not
+   attempt to muck with.  For now, it is only used to prevent it from
+   mucking up an explicitly long double argument.  */
+struct test_fj_f_data
 {
   const char *arg_str;
   FLOAT arg1;
@@ -1366,6 +1369,7 @@ struct test_fFF_11_data
   ROUND_RESTORE_ ## ROUNDING_MODE
 #define RUN_TEST_ff_f RUN_TEST_2_f
 #define RUN_TEST_LOOP_ff_f RUN_TEST_LOOP_2_f
+#define RUN_TEST_LOOP_fj_f RUN_TEST_LOOP_2_f
 #define RUN_TEST_fi_f RUN_TEST_2_f
 #define RUN_TEST_LOOP_fi_f RUN_TEST_LOOP_2_f
 #define RUN_TEST_fl_f RUN_TEST_2_f
@@ -9989,110 +9993,112 @@ nextafter_test (void)
 }
 
 
-static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
+/* Note, the second argument is always typed as long double.  The j type argument to TEST_
+   indicates the literal should not be post-processed by gen-libm-test.pl.  */
+static const struct test_fj_f_data nexttoward_test_data[] =
   {
-    TEST_ff_f (nexttoward, 0, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_zero, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, 9, 9, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -9, -9, -9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, minus_infty, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, plus_infty, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.1L, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.1L, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, plus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, minus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-
-    TEST_ff_f (nexttoward, max_value, plus_infty, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -max_value, minus_infty, minus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
-
-    TEST_ff_f (nexttoward, min_subnorm_value, 0, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, min_subnorm_value, minus_zero, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
-    TEST_ff_f (nexttoward, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, 0, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_zero, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, 9, 9, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -9, -9, -9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, minus_infty, minus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, minus_infty, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, plus_infty, -max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, 1.1L, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.1L, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.1L, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, plus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, minus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+
+    TEST_fj_f (nexttoward, max_value, plus_infty, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -max_value, minus_infty, minus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION|ERRNO_ERANGE),
+
+    TEST_fj_f (nexttoward, min_subnorm_value, 0, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, min_subnorm_value, minus_zero, 0, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -min_subnorm_value, 0, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
+    TEST_fj_f (nexttoward, -min_subnorm_value, minus_zero, minus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION|ERRNO_ERANGE),
 
 #if TEST_COND_binary32
-    TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0.9L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, -LDBL_MAX, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -1.1L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -LDBL_MAX, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0.9L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, LDBL_MAX, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -0x1.3p-145, -0xap-148L, -0x1.4p-145, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
+    TEST_fj_f (nexttoward, 1.0, 1.1L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, LDBL_MAX, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0.9L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, -LDBL_MAX, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -1.1L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -LDBL_MAX, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0.9L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, LDBL_MAX, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -0x1.3p-145, -0xap-148L, -0x1.4p-145, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
 # if LDBL_MANT_DIG >= 64
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 106
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 113
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.000002p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.ffffffp0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
 #if TEST_COND_binary64
-    TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, LDBL_MAX, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0.9L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, -LDBL_MAX, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -1.1L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -LDBL_MAX, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0.9L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, LDBL_MAX, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x8.00346dc5d6388p-3L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 0x1p-1074, 0x1p-1073L, 0x1p-1073, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
+    TEST_fj_f (nexttoward, 1.0, 1.1L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, LDBL_MAX, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000001p0, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0.9L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, -LDBL_MAX, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.fffffffffffff8p0, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -1.1L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -LDBL_MAX, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000001p0, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0.9L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, LDBL_MAX, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.fffffffffffff8p0, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x8.00346dc5d6388p-3L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 0x1p-1074, 0x1p-1073L, 0x1p-1073, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
 # if LDBL_MANT_DIG >= 64
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000002p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000002p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 106
-    TEST_ff_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.000000000000000000000000008p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffcp0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.000000000000000000000000008p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffcp0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 # if LDBL_MANT_DIG >= 113
-    TEST_ff_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x1.0000000000000000000000000001p0L, 0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, 1.0, 0x0.ffffffffffffffffffffffffffff8p0L, 0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x1.0000000000000000000000000001p0L, -0x1.0000000000001p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_fj_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
 # endif
 #endif
   };
@@ -10100,7 +10106,7 @@ static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
 static void
 nexttoward_test (void)
 {
-  ALL_RM_TEST (nexttoward, 1, nexttoward_test_data, RUN_TEST_LOOP_ff_f, END);
+  ALL_RM_TEST (nexttoward, 1, nexttoward_test_data, RUN_TEST_LOOP_fj_f, END);
 }
 
 
-- 
2.4.11


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-05-27 21:42         ` Paul E. Murphy
@ 2016-06-03 20:24           ` Joseph Myers
  2016-06-08 20:03             ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-06-03 20:24 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Fri, 27 May 2016, Paul E. Murphy wrote:

> On 05/27/2016 02:49 PM, Joseph Myers wrote:
> > On Fri, 27 May 2016, Paul E. Murphy wrote:
> > 
> >> Ok, so the new option can be generalized to one which does not attempt to
> >> fixup an FP literal.
> >>
> >> Likewise, I assume wrap_lit should be squashed with apply_lit.
> > 
> > Yes.
> > 
> 
> Here is an updated patch with such changes.

OK with the comment on nexttoward_test_data rewrapped to avoid over-long 
lines.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc
  2016-05-26 22:45 ` [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc Paul E. Murphy
@ 2016-06-03 20:35   ` Joseph Myers
  2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-06-03 20:35 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> Use gen-libm-test.pl to generate a list of macros
> mapping to libm-test-ulps.h as this simplifies adding new
> types without having to modify a growing number of
> static headers each time a type is added.
> 
> This also removes the final usage of the TEST_(DOUBLE|FLOAT|LDOUBLE)
> macros.  Thus, they too are removed.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 10/11] Remove type specific information from auto-libm-test-in
  2016-05-26 21:53 ` [PATCHv3 10/11] Remove type specific information from auto-libm-test-in Paul E. Murphy
@ 2016-06-03 20:37   ` Joseph Myers
  2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-06-03 20:37 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> Apply the following sed regexes to auto-libm-test-in in order:
> 
> s/flt-32/binary32/
> s/dbl-64/binary64/
> s/ldbl-96-intel/intel96/
> s/ldbl-96-m68k/m68k96/
> s/ldbl-128ibm/ibm128/
> s/ldbl-128/binary128/
> 
> and fixup ldbl-96 comment manually.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 11/11] Generate new format names in auto-libm-test-out
  2016-05-26 21:43 ` [PATCHv3 11/11] Generate new format names in auto-libm-test-out Paul E. Murphy
@ 2016-06-06 21:05   ` Joseph Myers
  2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 1 reply; 40+ messages in thread
From: Joseph Myers @ 2016-06-06 21:05 UTC (permalink / raw)
  To: Paul E. Murphy; +Cc: libc-alpha

On Thu, 26 May 2016, Paul E. Murphy wrote:

> @@ -1648,8 +1645,7 @@ int_fits_type (mpz_t z, arg_ret_type type, int long_bits)
>  
>  static void
>  output_generic_value (FILE *fp, const char *filename, const generic_value *v,
> -		      bool ignore, arg_ret_type type, fp_format format,
> -		      int long_bits)
> +		      bool ignore, arg_ret_type type, int long_bits)
>  {
>    if (ignore)
>      {

Removing the function argument FORMAT means you also need to remove the 
mention of it from the comment above the function.

OK with that change.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 11/11] Generate new format names in auto-libm-test-out
  2016-06-06 21:05   ` Joseph Myers
@ 2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-06-08 20:03 UTC (permalink / raw)
  To: libc-alpha



On 06/06/2016 04:04 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> @@ -1648,8 +1645,7 @@ int_fits_type (mpz_t z, arg_ret_type type, int long_bits)
>>  
>>  static void
>>  output_generic_value (FILE *fp, const char *filename, const generic_value *v,
>> -		      bool ignore, arg_ret_type type, fp_format format,
>> -		      int long_bits)
>> +		      bool ignore, arg_ret_type type, int long_bits)
>>  {
>>    if (ignore)
>>      {
> 
> Removing the function argument FORMAT means you also need to remove the 
> mention of it from the comment above the function.
> 
> OK with that change.
>

Comment updated.  Committed as 5188b97.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 10/11] Remove type specific information from auto-libm-test-in
  2016-06-03 20:37   ` Joseph Myers
@ 2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-06-08 20:03 UTC (permalink / raw)
  To: libc-alpha



On 06/03/2016 03:37 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> Apply the following sed regexes to auto-libm-test-in in order:
>>
>> s/flt-32/binary32/
>> s/dbl-64/binary64/
>> s/ldbl-96-intel/intel96/
>> s/ldbl-96-m68k/m68k96/
>> s/ldbl-128ibm/ibm128/
>> s/ldbl-128/binary128/
>>
>> and fixup ldbl-96 comment manually.
> 
> OK.
> 

Committed as 760723e.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc
  2016-06-03 20:35   ` Joseph Myers
@ 2016-06-08 20:03     ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-06-08 20:03 UTC (permalink / raw)
  To: libc-alpha



On 06/03/2016 03:35 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> Use gen-libm-test.pl to generate a list of macros
>> mapping to libm-test-ulps.h as this simplifies adding new
>> types without having to modify a growing number of
>> static headers each time a type is added.
>>
>> This also removes the final usage of the TEST_(DOUBLE|FLOAT|LDOUBLE)
>> macros.  Thus, they too are removed.
> 
> OK.
> 

Committed as 9c665e0.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
  2016-06-03 20:24           ` Joseph Myers
@ 2016-06-08 20:03             ` Paul E. Murphy
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. Murphy @ 2016-06-08 20:03 UTC (permalink / raw)
  To: libc-alpha



On 06/03/2016 03:24 PM, Joseph Myers wrote:
> On Fri, 27 May 2016, Paul E. Murphy wrote:
> 
>> On 05/27/2016 02:49 PM, Joseph Myers wrote:
>>> On Fri, 27 May 2016, Paul E. Murphy wrote:
>>>
>>>> Ok, so the new option can be generalized to one which does not attempt to
>>>> fixup an FP literal.
>>>>
>>>> Likewise, I assume wrap_lit should be squashed with apply_lit.
>>>
>>> Yes.
>>>
>>
>> Here is an updated patch with such changes.
> 
> OK with the comment on nexttoward_test_data rewrapped to avoid over-long 
> lines.


Fixed.  Committed as 8938513.

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2016-06-08 20:03 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 21:42 [PATCHv3 00/11] Refactor libm-test.c and friends Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c Paul E. Murphy
2016-05-27 17:32   ` Joseph Myers
2016-05-27 18:16     ` Paul E. Murphy
2016-05-27 19:51       ` Joseph Myers
2016-05-27 21:42         ` Paul E. Murphy
2016-06-03 20:24           ` Joseph Myers
2016-06-08 20:03             ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 01/11] Begin refactor of libm-test.inc Paul E. Murphy
2016-05-26 22:56   ` Joseph Myers
2016-05-27 15:09     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc Paul E. Murphy
2016-05-27 13:35   ` Joseph Myers
2016-05-27 17:13     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 07/11] Replace M_El with lit_e " Paul E. Murphy
2016-05-27 14:00   ` Joseph Myers
2016-05-27 17:24     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 11/11] Generate new format names in auto-libm-test-out Paul E. Murphy
2016-06-06 21:05   ` Joseph Myers
2016-06-08 20:03     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 02/11] Refactor type specific macros using regexes Paul E. Murphy
2016-05-26 22:59   ` Joseph Myers
2016-05-27 15:28     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 04/11] Replace M_PI2l with lit_pi_2_d in libm-test.inc Paul E. Murphy
2016-05-27 13:32   ` Joseph Myers
2016-05-27 17:12     ` Paul E. Murphy
2016-05-26 21:43 ` [PATCHv3 03/11] Refactor M_ macros defined " Paul E. Murphy
2016-05-27  8:43   ` Joseph Myers
2016-05-27 16:08     ` Paul E. Murphy
2016-05-27 17:12       ` Joseph Myers
2016-05-27 17:12         ` Paul E. Murphy
2016-05-26 21:53 ` [PATCHv3 05/11] Replace M_PIl with lit_pi " Paul E. Murphy
2016-05-27 13:33   ` Joseph Myers
2016-05-27 17:13     ` Paul E. Murphy
2016-05-26 21:53 ` [PATCHv3 10/11] Remove type specific information from auto-libm-test-in Paul E. Murphy
2016-06-03 20:37   ` Joseph Myers
2016-06-08 20:03     ` Paul E. Murphy
2016-05-26 22:45 ` [PATCHv3 09/11] Remove CHOOSE() macro from libm-tests.inc Paul E. Murphy
2016-06-03 20:35   ` Joseph Myers
2016-06-08 20:03     ` Paul E. Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).