about summary refs log tree commit diff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-03-17 12:29:26 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-03-17 12:29:26 +0000
commit9962a2d34e2478bd05a8a08e537a1e2b6897adb2 (patch)
tree8dc1f8edc5691783e07c99dab8883ca79d6e9054 /math/libm-test.inc
parent5006148ee57c80a787b275c04587678e9fe0a3f3 (diff)
downloadglibc-9962a2d34e2478bd05a8a08e537a1e2b6897adb2.tar.gz
glibc-9962a2d34e2478bd05a8a08e537a1e2b6897adb2.tar.xz
glibc-9962a2d34e2478bd05a8a08e537a1e2b6897adb2.zip
Add libm-test support for per-rounding-mode manually specified results.
This patch continues the libm-test move towards automatic testing of
all test inputs in all rounding modes by adding gen-libm-test.pl
support for tests specifying results in each rounding mode manually.

Previously a TEST_* line could specify arguments and results, or
arguments, results and flags.  Now there is the option of (arguments,
results-rd, flags-rd, results-rn, flags-rn, results-rz, flags-rz,
results-ru, flags-ru).  This is used to replace the separate arrays of
results in each rounding mode for lrint, llrint and rint.  (In the
case of rint, some tests were only in rint_test_data and needed to
have expectations for non-default rounding modes added, which I did
manually.  In various cases there were slight differences in things
such as the ordering of tests in the arrays for each mode.)

Tested x86_64 and x86.

	* math/gen-libm-test.pl (parse_args): Handle results specified for
	each rounding mode separately.
	* math/libm-test.inc (lrint_test_data): Merge in per-rounding-mode
	tests and results from lrint_tonearest_test_data,
	lrint_towardzero_test_data, lrint_downward_test_data and
	lrint_upward_test_data.
	(lrint_test): Use ALL_RM_TEST.
	(lrint_tonearest_test_data): Remove.
	(lrint_test_tonearest): Likewise.
	(lrint_towardzero_test_data): Likewise.
	(lrint_test_towardzero): Likewise.
	(lrint_downward_test_data): Likewise.
	(lrint_test_downward): Likewise.
	(lrint_upward_test_data): Likewise.
	(lrint_test_upward): Likewise.
	(llrint_test_data): Merge in per-rounding-mode tests and results
	from llrint_tonearest_test_data, llrint_towardzero_test_data,
	llrint_downward_test_data and llrint_upward_test_data.
	(llrint_test): Use ALL_RM_TEST.
	(llrint_tonearest_test_data): Remove.
	(llrint_test_tonearest): Likewise.
	(llrint_towardzero_test_data): Likewise.
	(llrint_test_towardzero): Likewise.
	(llrint_downward_test_data): Likewise.
	(llrint_test_downward): Likewise.
	(llrint_upward_test_data): Likewise.
	(llrint_test_upward): Likewise.
	(rint_test_data): Merge in per-rounding-mode tests and results
	from rint_tonearest_test_data, rint_towardzero_test_data,
	rint_downward_test_data and rint_upward_test_data.  Add
	per-rounding-mode results for tests not in those arrays.
	(rint_test): Use ALL_RM_TEST.
	(rint_tonearest_test_data): Remove.
	(rint_test_tonearest): Likewise.
	(rint_towardzero_test_data): Likewise.
	(rint_test_towardzero): Likewise.
	(rint_downward_test_data): Likewise.
	(rint_test_downward): Likewise.
	(rint_upward_test_data): Likewise.
	(rint_test_upward): Likewise.
	(main): Don't call removed functions.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc1402
1 files changed, 182 insertions, 1220 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 2c0130b6d5..2a458168c8 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -8229,28 +8229,29 @@ gamma_test (void)
 
 static const struct test_f_l_data lrint_test_data[] =
   {
-    /* XXX this test is incomplete.  We need to have a way to specifiy
-       the rounding method and test the critical cases.  So far, only
-       unproblematic numbers are tested.  */
     TEST_f_l (lrint, plus_infty, IGNORE, INVALID_EXCEPTION),
     TEST_f_l (lrint, minus_infty, IGNORE, INVALID_EXCEPTION),
     TEST_f_l (lrint, qnan_value, IGNORE, INVALID_EXCEPTION),
     TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
     TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.2L, 0, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, -0.2L, -1, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 0.5L, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, -0.5L, -1, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 0.8L, 0, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, -0.8L, -1, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION),
 
-    TEST_f_l (lrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -1.4L, -1, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 1.4L, 1, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION, 2, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, -1.4L, -2, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION),
 
-    TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION, 8388600, INEXACT_EXCEPTION, 8388600, INEXACT_EXCEPTION, 8388601, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, -8388600.3L, -8388601, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION),
 
 #ifndef TEST_FLOAT
-    TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION, 1071930, INEXACT_EXCEPTION, 1071930, INEXACT_EXCEPTION, 1071931, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION, 1073741824, INEXACT_EXCEPTION, 1073741824, INEXACT_EXCEPTION, 1073741825, INEXACT_EXCEPTION),
 # if LONG_MAX > 281474976710656 && defined TEST_LDOUBLE
-    TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
+    TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION, 281474976710656, INEXACT_EXCEPTION, 281474976710656, INEXACT_EXCEPTION, 281474976710657, INEXACT_EXCEPTION),
 # endif
 #endif
   };
@@ -8258,185 +8259,28 @@ static const struct test_f_l_data lrint_test_data[] =
 static void
 lrint_test (void)
 {
-  START (lrint, 1);
-  RUN_TEST_LOOP_f_l (lrint, lrint_test_data, );
-  END;
-}
-
-
-static const struct test_f_l_data lrint_tonearest_test_data[] =
-  {
-    TEST_f_l (lrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.8L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.8L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION),
-# if LONG_MAX > 281474976710656 && defined TEST_LDOUBLE
-    TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-lrint_test_tonearest (void)
-{
-  START (lrint_tonearest, 1);
-  RUN_TEST_LOOP_f_l (lrint, lrint_tonearest_test_data, FE_TONEAREST);
-  END;
-}
-
-
-static const struct test_f_l_data lrint_towardzero_test_data[] =
-  {
-    TEST_f_l (lrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.8L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.8L, 0, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION),
-# if LONG_MAX > 281474976710656 && defined TEST_LDOUBLE
-    TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-lrint_test_towardzero (void)
-{
-  START (lrint_towardzero, 1);
-  RUN_TEST_LOOP_f_l (lrint, lrint_towardzero_test_data, FE_TOWARDZERO);
-  END;
-}
-
-
-static const struct test_f_l_data lrint_downward_test_data[] =
-  {
-    TEST_f_l (lrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.2L, -1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.5L, -1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.8L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.8L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -1.4L, -2, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -8388600.3L, -8388601, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_l (lrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 1073741824.01, 1073741824, INEXACT_EXCEPTION),
-# if LONG_MAX > 281474976710656 && defined TEST_LDOUBLE
-    TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-lrint_test_downward (void)
-{
-  START (lrint_downward, 1);
-  RUN_TEST_LOOP_f_l (lrint, lrint_downward_test_data, FE_DOWNWARD);
-  END;
-}
-
-
-static const struct test_f_l_data lrint_upward_test_data[] =
-  {
-    TEST_f_l (lrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.2L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.5L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.5L, 0, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 0.8L, 1, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -0.8L, 0, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 1.4L, 2, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_l (lrint, 8388600.3L, 8388601, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_l (lrint, 1071930.0008, 1071931, INEXACT_EXCEPTION),
-    TEST_f_l (lrint, 1073741824.01, 1073741825, INEXACT_EXCEPTION),
-# if LONG_MAX > 281474976710656 && defined (TEST_LDOUBLE)
-    TEST_f_l (lrint, 281474976710656.025L, 281474976710657, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-lrint_test_upward (void)
-{
-  START (lrint_upward, 1);
-  RUN_TEST_LOOP_f_l (lrint, lrint_upward_test_data, FE_UPWARD);
-  END;
+  ALL_RM_TEST (lrint, 1, lrint_test_data, RUN_TEST_LOOP_f_l, END);
 }
 
 
 static const struct test_f_L_data llrint_test_data[] =
   {
-    /* XXX this test is incomplete.  We need to have a way to specifiy
-       the rounding method and test the critical cases.  So far, only
-       unproblematic numbers are tested.  */
     TEST_f_L (llrint, plus_infty, IGNORE, INVALID_EXCEPTION),
     TEST_f_L (llrint, minus_infty, IGNORE, INVALID_EXCEPTION),
     TEST_f_L (llrint, qnan_value, IGNORE, INVALID_EXCEPTION),
     TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
     TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -0.2L, 0, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -0.2L, -1, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION, 0, INEXACT_EXCEPTION),
 
-    TEST_f_L (llrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -1.4L, -1, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 1.4L, 1, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION, 1, INEXACT_EXCEPTION, 2, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -1.4L, -2, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION, -1, INEXACT_EXCEPTION),
 
-    TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION, 8388600, INEXACT_EXCEPTION, 8388600, INEXACT_EXCEPTION, 8388601, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -8388600.3L, -8388601, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION, -8388600, INEXACT_EXCEPTION),
 
 #ifndef TEST_FLOAT
-    TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION, 1071930, INEXACT_EXCEPTION, 1071930, INEXACT_EXCEPTION, 1071931, INEXACT_EXCEPTION),
 #endif
 
     /* Test boundary conditions.  */
@@ -8464,361 +8308,85 @@ static const struct test_f_L_data llrint_test_data[] =
     TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION),
 #ifdef TEST_LDOUBLE
     /* The input can only be represented in long double.  */
-    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370498LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370498LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370498LL, INEXACT_EXCEPTION),
+
+    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION, -4503599627370498LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION),
 
 # if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927938LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370498LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370494LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370494LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370495LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION, 4503599627370496LL, INEXACT_EXCEPTION, 4503599627370497LL, INEXACT_EXCEPTION),
+
+    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370498LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370494LL, INEXACT_EXCEPTION, -4503599627370494LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION, -4503599627370495LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370497LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION, -4503599627370496LL, INEXACT_EXCEPTION),
 # endif
-#endif
-  };
 
-static void
-llrint_test (void)
-{
-  START (llrint, 1);
-  RUN_TEST_LOOP_f_L (llrint, llrint_test_data, );
-  END;
-}
+    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740994LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740994LL, INEXACT_EXCEPTION),
 
-static const struct test_f_L_data llrint_tonearest_test_data[] =
-  {
-    TEST_f_L (llrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -0.2L, 0, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-#endif
-
-    /* Test boundary conditions.  */
-    /* 0x1FFFFF */
-    TEST_f_L (llrint, 2097151.0,2097151LL, NO_INEXACT_EXCEPTION),
-    /* 0x800000 */
-    TEST_f_L (llrint, 8388608.0, 8388608LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000 */
-    TEST_f_L (llrint, 16777216.0, 16777216LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000 */
-    TEST_f_L (llrint, 2199023255552.0, 2199023255552LL, NO_INEXACT_EXCEPTION),
-    /* 0x40000000000 */
-    TEST_f_L (llrint, 4398046511104.0, 4398046511104LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000000000 */
-    TEST_f_L (llrint, 281474976710656.0, 281474976710656LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000000000000 */
-    TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000080000000 */
-    TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000000 */
-    TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL, NO_INEXACT_EXCEPTION),
-    /* 0x80000000000000 */
-    TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION),
-    /* 0x100000000000000 */
-    TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION),
-#ifdef TEST_LDOUBLE
-    /* The input can only be represented in long double.  */
-    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370498LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION, -9007199254740994LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION),
 
 # if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927938LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740994LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740991LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740992LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740994LL, INEXACT_EXCEPTION, 9007199254740993LL, INEXACT_EXCEPTION, 9007199254740994LL, INEXACT_EXCEPTION),
+
+    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740994LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION, -9007199254740991LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION, -9007199254740992LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL, INEXACT_EXCEPTION, -9007199254740994LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION, -9007199254740993LL, INEXACT_EXCEPTION),
 # endif
-#endif
-  };
 
-static void
-llrint_test_tonearest (void)
-{
-  START (llrint_tonearest, 1);
-  RUN_TEST_LOOP_f_L (llrint, llrint_tonearest_test_data, FE_TONEAREST);
-  END;
-}
-
-static const struct test_f_L_data llrint_towardzero_test_data[] =
-  {
-    TEST_f_L (llrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -0.2L, 0, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-#endif
-
-    /* Test boundary conditions.  */
-    /* 0x1FFFFF */
-    TEST_f_L (llrint, 2097151.0,2097151LL, NO_INEXACT_EXCEPTION),
-    /* 0x800000 */
-    TEST_f_L (llrint, 8388608.0, 8388608LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000 */
-    TEST_f_L (llrint, 16777216.0, 16777216LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000 */
-    TEST_f_L (llrint, 2199023255552.0, 2199023255552LL, NO_INEXACT_EXCEPTION),
-    /* 0x40000000000 */
-    TEST_f_L (llrint, 4398046511104.0, 4398046511104LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000000000 */
-    TEST_f_L (llrint, 281474976710656.0, 281474976710656LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000000000000 */
-    TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000080000000 */
-    TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000000 */
-    TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL, NO_INEXACT_EXCEPTION),
-    /* 0x80000000000000 */
-    TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION),
-    /* 0x100000000000000 */
-    TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION),
-#ifdef TEST_LDOUBLE
-    /* The input can only be represented in long double.  */
-    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370497LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370494LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370494LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740993LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927935LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927935LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927937LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927937LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927937LL, INEXACT_EXCEPTION, 72057594037927936LL, INEXACT_EXCEPTION, 72057594037927937LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927937LL, INEXACT_EXCEPTION, 72057594037927938LL, INEXACT_EXCEPTION, 72057594037927937LL, INEXACT_EXCEPTION, 72057594037927938LL, INEXACT_EXCEPTION),
 
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION),
-#endif
-
-    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927935LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927937LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927935LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927937LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927935LL, INEXACT_EXCEPTION, -72057594037927935LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927937LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927937LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION, -72057594037927937LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION, -72057594037927936LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION, -72057594037927938LL, INEXACT_EXCEPTION, -72057594037927937LL, INEXACT_EXCEPTION, -72057594037927937LL, INEXACT_EXCEPTION),
 
 # if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775805LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL, INEXACT_EXCEPTION, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775805LL, INEXACT_EXCEPTION, 9223372036854775806LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775805LL, INEXACT_EXCEPTION, -9223372036854775805LL, INEXACT_EXCEPTION),
     TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION),
     TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775806LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775807LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775807LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L, INEXACT_EXCEPTION, 9223372036854775806L, INEXACT_EXCEPTION, 9223372036854775806L, INEXACT_EXCEPTION, 9223372036854775807L, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775807LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775807LL, INEXACT_EXCEPTION, 9223372036854775806LL, INEXACT_EXCEPTION, 9223372036854775807LL, INEXACT_EXCEPTION),
+    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL, INEXACT_EXCEPTION, -9223372036854775807LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION, -9223372036854775806LL, INEXACT_EXCEPTION),
     TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL, NO_INEXACT_EXCEPTION),
     TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
 # endif
@@ -8826,277 +8394,9 @@ static const struct test_f_L_data llrint_towardzero_test_data[] =
   };
 
 static void
-llrint_test_towardzero (void)
-{
-  START (llrint_towardzero, 1);
-  RUN_TEST_LOOP_f_L (llrint, llrint_towardzero_test_data, FE_TOWARDZERO);
-  END;
-}
-
-static const struct test_f_L_data llrint_downward_test_data[] =
-  {
-    TEST_f_L (llrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -0.2L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 1.4L, 1, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -1.4L, -2, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 8388600.3L, 8388600, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -8388600.3L, -8388601, INEXACT_EXCEPTION),
-
-#ifndef TEST_FLOAT
-    TEST_f_L (llrint, 1071930.0008, 1071930, INEXACT_EXCEPTION),
-#endif
-
-    /* Test boundary conditions.  */
-    /* 0x1FFFFF */
-    TEST_f_L (llrint, 2097151.0,2097151LL, NO_INEXACT_EXCEPTION),
-    /* 0x800000 */
-    TEST_f_L (llrint, 8388608.0, 8388608LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000 */
-    TEST_f_L (llrint, 16777216.0, 16777216LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000 */
-    TEST_f_L (llrint, 2199023255552.0, 2199023255552LL, NO_INEXACT_EXCEPTION),
-    /* 0x40000000000 */
-    TEST_f_L (llrint, 4398046511104.0, 4398046511104LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000000000 */
-    TEST_f_L (llrint, 281474976710656.0, 281474976710656LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000000000000 */
-    TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000080000000 */
-    TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000000 */
-    TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL, NO_INEXACT_EXCEPTION),
-    /* 0x80000000000000 */
-    TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION),
-    /* 0x100000000000000 */
-    TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION),
-#ifdef TEST_LDOUBLE
-    /* The input can only be represented in long double.  */
-    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370494LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370498LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740994LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927935LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927937LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-llrint_test_downward (void)
-{
-  START (llrint_downward, 1);
-  RUN_TEST_LOOP_f_L (llrint, llrint_downward_test_data, FE_DOWNWARD);
-  END;
-}
-
-static const struct test_f_L_data llrint_upward_test_data[] =
-  {
-    TEST_f_L (llrint, plus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, minus_infty, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, qnan_value, IGNORE, INVALID_EXCEPTION),
-    TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 0.2L, 1, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -0.2L, 0, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 1.4L, 2, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -1.4L, -1, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 8388600.3L, 8388601, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -8388600.3L, -8388600, INEXACT_EXCEPTION),
-#ifndef TEST_FLOAT
-    TEST_f_L (llrint, 1071930.0008, 1071931, INEXACT_EXCEPTION),
-#endif
-    /* Test boundary conditions.  */
-    /* 0x1FFFFF */
-    TEST_f_L (llrint, 2097151.0,2097151LL, NO_INEXACT_EXCEPTION),
-    /* 0x800000 */
-    TEST_f_L (llrint, 8388608.0, 8388608LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000 */
-    TEST_f_L (llrint, 16777216.0, 16777216LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000 */
-    TEST_f_L (llrint, 2199023255552.0, 2199023255552LL, NO_INEXACT_EXCEPTION),
-    /* 0x40000000000 */
-    TEST_f_L (llrint, 4398046511104.0, 4398046511104LL, NO_INEXACT_EXCEPTION),
-    /* 0x1000000000000 */
-    TEST_f_L (llrint, 281474976710656.0, 281474976710656LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000000000000 */
-    TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL, NO_INEXACT_EXCEPTION),
-    /* 0x10000080000000 */
-    TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL, NO_INEXACT_EXCEPTION),
-    /* 0x20000000000000 */
-    TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL, NO_INEXACT_EXCEPTION),
-    /* 0x80000000000000 */
-    TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL, NO_INEXACT_EXCEPTION),
-    /* 0x100000000000000 */
-    TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL, NO_INEXACT_EXCEPTION),
-#ifdef TEST_LDOUBLE
-    /* The input can only be represented in long double.  */
-    TEST_f_L (llrint, 4503599627370495.5L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.25L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.75L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.5L, 4503599627370498LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370498LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.5L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.75L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.5L, -4503599627370497LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370494LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370495LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370496LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.25L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.75L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740994LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.5L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.75L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5L, -9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740991LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740992LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740993LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.25L, 72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.5L, 72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927936.75L, 72057594037927937LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 72057594037927937.5L, 72057594037927938LL, INEXACT_EXCEPTION),
-
-    TEST_f_L (llrint, -72057594037927935.5L, -72057594037927935LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927936.75L, -72057594037927936LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -72057594037927937.5L, -72057594037927937LL, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775805LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775807L, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775806LL, INEXACT_EXCEPTION),
-    TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL, NO_INEXACT_EXCEPTION),
-    TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-llrint_test_upward (void)
+llrint_test (void)
 {
-  START (llrint_upward, 1);
-  RUN_TEST_LOOP_f_L (llrint, llrint_upward_test_data, FE_UPWARD);
-  END;
+  ALL_RM_TEST (llrint, 1, llrint_test_data, RUN_TEST_LOOP_f_L, END);
 }
 
 
@@ -10093,452 +9393,126 @@ static const struct test_f_f_data rint_test_data[] =
   {
     /* TODO: missing qNaN tests.  */
 
-    TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
     TEST_f_f (rint, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
     TEST_f_f (rint, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
 
-    /* Default rounding mode is round to even.  */
-    TEST_f_f (rint, 0.5, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.5, 2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2.5, 2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 3.5, 4.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4.5, 4.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.5, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.5, -2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2.5, -2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -3.5, -4.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4.5, -4.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.1, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.25, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.625, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.1, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.25, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.625, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 262144.75, 262145.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 262142.75, 262143.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 524286.75, 524287.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 524288.75, 524289.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1048576.75, 1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2097152.75, 2097153.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1048576.75, -1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2097152.75, -2097153.0, INEXACT_EXCEPTION),
-#ifndef TEST_FLOAT
-    TEST_f_f (rint, 70368744177664.75, 70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 140737488355328.75, 140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 281474976710656.75, 281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 562949953421312.75, 562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -70368744177664.75, -70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -140737488355328.75, -140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -281474976710656.75, -281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -562949953421312.75, -562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0, INEXACT_EXCEPTION),
-#endif
-#ifdef TEST_LDOUBLE
-    /* The result can only be represented in long double.  */
-    TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L, INEXACT_EXCEPTION),
-# endif
-
-    TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
-# endif
-
-    TEST_f_f (rint, 9007199254740991.5L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.25L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.75L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5L, 9007199254740994.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.5L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.25L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.75L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5L, -9007199254740994.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 72057594037927935.5L, 72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 72057594037927936.25L, 72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 72057594037927936.5L, 72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 72057594037927936.75L, 72057594037927937.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 72057594037927937.5L, 72057594037927938.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -72057594037927935.5L, -72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -72057594037927936.25L, -72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -72057594037927936.5L, -72057594037927936.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -72057594037927936.75L, -72057594037927937.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -72057594037927937.5L, -72057594037927938.0L, INEXACT_EXCEPTION),
-
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-rint_test (void)
-{
-  START (rint, 1);
-  RUN_TEST_LOOP_f_f (rint, rint_test_data, );
-  END;
-}
-
-static const struct test_f_f_data rint_tonearest_test_data[] =
-  {
+    TEST_f_f (rint, 4.5, 4.0, INEXACT_EXCEPTION, 4.0, INEXACT_EXCEPTION, 4.0, INEXACT_EXCEPTION, 5.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 3.5, 3.0, INEXACT_EXCEPTION, 4.0, INEXACT_EXCEPTION, 3.0, INEXACT_EXCEPTION, 4.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 2.5, 2.0, INEXACT_EXCEPTION, 2.0, INEXACT_EXCEPTION, 2.0, INEXACT_EXCEPTION, 3.0, INEXACT_EXCEPTION),
     TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.5, 2.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 1.5, 1.0, INEXACT_EXCEPTION, 2.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION, 2.0, INEXACT_EXCEPTION),
     TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.5, 0.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 0.5, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION),
     TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
     TEST_f_f (rint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.5, -0.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -0.5, -1.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION),
     TEST_f_f (rint, -1.0, -1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.5, -2.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -1.5, -2.0, INEXACT_EXCEPTION, -2.0, INEXACT_EXCEPTION, -1.0, INEXACT_EXCEPTION, -1.0, INEXACT_EXCEPTION),
     TEST_f_f (rint, -2.0, -2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.1, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.25, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.625, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.1, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.25, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.625, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1048576.75, 1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2097152.75, 2097153.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1048576.75, -1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2097152.75, -2097153.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -2.5, -3.0, INEXACT_EXCEPTION, -2.0, INEXACT_EXCEPTION, -2.0, INEXACT_EXCEPTION, -2.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -3.5, -4.0, INEXACT_EXCEPTION, -4.0, INEXACT_EXCEPTION, -3.0, INEXACT_EXCEPTION, -3.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4.5, -5.0, INEXACT_EXCEPTION, -4.0, INEXACT_EXCEPTION, -4.0, INEXACT_EXCEPTION, -4.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 0.1, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 0.25, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 0.625, 0.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION, 0.0, INEXACT_EXCEPTION, 1.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -0.1, -1.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -0.25, -1.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -0.625, -1.0, INEXACT_EXCEPTION, -1.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION, -0.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 262144.75, 262144.0, INEXACT_EXCEPTION, 262145.0, INEXACT_EXCEPTION, 262144.0, INEXACT_EXCEPTION, 262145.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 262142.75, 262142.0, INEXACT_EXCEPTION, 262143.0, INEXACT_EXCEPTION, 262142.0, INEXACT_EXCEPTION, 262143.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 524286.75, 524286.0, INEXACT_EXCEPTION, 524287.0, INEXACT_EXCEPTION, 524286.0, INEXACT_EXCEPTION, 524287.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 524288.75, 524288.0, INEXACT_EXCEPTION, 524289.0, INEXACT_EXCEPTION, 524288.0, INEXACT_EXCEPTION, 524289.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 1048576.75, 1048576.0, INEXACT_EXCEPTION, 1048577.0, INEXACT_EXCEPTION, 1048576.0, INEXACT_EXCEPTION, 1048577.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 2097152.75, 2097152.0, INEXACT_EXCEPTION, 2097153.0, INEXACT_EXCEPTION, 2097152.0, INEXACT_EXCEPTION, 2097153.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -1048576.75, -1048577.0, INEXACT_EXCEPTION, -1048577.0, INEXACT_EXCEPTION, -1048576.0, INEXACT_EXCEPTION, -1048576.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -2097152.75, -2097153.0, INEXACT_EXCEPTION, -2097153.0, INEXACT_EXCEPTION, -2097152.0, INEXACT_EXCEPTION, -2097152.0, INEXACT_EXCEPTION),
 #ifndef TEST_FLOAT
-    TEST_f_f (rint, 70368744177664.75, 70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 140737488355328.75, 140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 281474976710656.75, 281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 562949953421312.75, 562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -70368744177664.75, -70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -140737488355328.75, -140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -281474976710656.75, -281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -562949953421312.75, -562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 70368744177664.75, 70368744177664.0, INEXACT_EXCEPTION, 70368744177665.0, INEXACT_EXCEPTION, 70368744177664.0, INEXACT_EXCEPTION, 70368744177665.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 140737488355328.75, 140737488355328.0, INEXACT_EXCEPTION, 140737488355329.0, INEXACT_EXCEPTION, 140737488355328.0, INEXACT_EXCEPTION, 140737488355329.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 281474976710656.75, 281474976710656.0, INEXACT_EXCEPTION, 281474976710657.0, INEXACT_EXCEPTION, 281474976710656.0, INEXACT_EXCEPTION, 281474976710657.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 562949953421312.75, 562949953421312.0, INEXACT_EXCEPTION, 562949953421313.0, INEXACT_EXCEPTION, 562949953421312.0, INEXACT_EXCEPTION, 562949953421313.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0, INEXACT_EXCEPTION, 1125899906842625.0, INEXACT_EXCEPTION, 1125899906842624.0, INEXACT_EXCEPTION, 1125899906842625.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -70368744177664.75, -70368744177665.0, INEXACT_EXCEPTION, -70368744177665.0, INEXACT_EXCEPTION, -70368744177664.0, INEXACT_EXCEPTION, -70368744177664.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -140737488355328.75, -140737488355329.0, INEXACT_EXCEPTION, -140737488355329.0, INEXACT_EXCEPTION, -140737488355328.0, INEXACT_EXCEPTION, -140737488355328.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -281474976710656.75, -281474976710657.0, INEXACT_EXCEPTION, -281474976710657.0, INEXACT_EXCEPTION, -281474976710656.0, INEXACT_EXCEPTION, -281474976710656.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -562949953421312.75, -562949953421313.0, INEXACT_EXCEPTION, -562949953421313.0, INEXACT_EXCEPTION, -562949953421312.0, INEXACT_EXCEPTION, -562949953421312.0, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0, INEXACT_EXCEPTION, -1125899906842625.0, INEXACT_EXCEPTION, -1125899906842624.0, INEXACT_EXCEPTION, -1125899906842624.0, INEXACT_EXCEPTION),
 #endif
 #ifdef TEST_LDOUBLE
     /* The result can only be represented in long double.  */
-    TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370495.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L, INEXACT_EXCEPTION, 4503599627370498.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION, 4503599627370498.0L, INEXACT_EXCEPTION),
 # if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370494.0L, INEXACT_EXCEPTION, 4503599627370495.0L, INEXACT_EXCEPTION, 4503599627370494.0L, INEXACT_EXCEPTION, 4503599627370495.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370495.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION, 4503599627370496.0L, INEXACT_EXCEPTION, 4503599627370497.0L, INEXACT_EXCEPTION),
 # endif
-    TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370495.0L, INEXACT_EXCEPTION, -4503599627370495.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370496.25L, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370496.5L, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L, INEXACT_EXCEPTION, -4503599627370498.0L, INEXACT_EXCEPTION, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370497.0L, INEXACT_EXCEPTION),
 # if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION, -4503599627370495.0L, INEXACT_EXCEPTION, -4503599627370494.0L, INEXACT_EXCEPTION, -4503599627370494.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370495.0L, INEXACT_EXCEPTION, -4503599627370495.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370497.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION, -4503599627370496.0L, INEXACT_EXCEPTION),
+
+    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740994.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740994.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740994.0L, INEXACT_EXCEPTION),
+
+    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION, -9007199254740994.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION),
 # endif
-#endif
-  };
 
-static void
-rint_test_tonearest (void)
-{
-  START (rint_tonearest, 1);
-  RUN_TEST_LOOP_f_f (rint, rint_tonearest_test_data, FE_TONEAREST);
-  END;
-}
+    TEST_f_f (rint, 9007199254740991.5L, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740991.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740992.25L, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740992.5L, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740992.75L, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740992.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 9007199254740993.5L, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740994.0L, INEXACT_EXCEPTION, 9007199254740993.0L, INEXACT_EXCEPTION, 9007199254740994.0L, INEXACT_EXCEPTION),
+
+    TEST_f_f (rint, -9007199254740991.5L, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION, -9007199254740991.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740992.25L, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740992.5L, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740992.75L, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION, -9007199254740992.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -9007199254740993.5L, -9007199254740994.0L, INEXACT_EXCEPTION, -9007199254740994.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION, -9007199254740993.0L, INEXACT_EXCEPTION),
+
+    TEST_f_f (rint, 72057594037927935.5L, 72057594037927935.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927935.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 72057594037927936.25L, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927937.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 72057594037927936.5L, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927937.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 72057594037927936.75L, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927937.0L, INEXACT_EXCEPTION, 72057594037927936.0L, INEXACT_EXCEPTION, 72057594037927937.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 72057594037927937.5L, 72057594037927937.0L, INEXACT_EXCEPTION, 72057594037927938.0L, INEXACT_EXCEPTION, 72057594037927937.0L, INEXACT_EXCEPTION, 72057594037927938.0L, INEXACT_EXCEPTION),
+
+    TEST_f_f (rint, -72057594037927935.5L, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927935.0L, INEXACT_EXCEPTION, -72057594037927935.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -72057594037927936.25L, -72057594037927937.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -72057594037927936.5L, -72057594037927937.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -72057594037927936.75L, -72057594037927937.0L, INEXACT_EXCEPTION, -72057594037927937.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION, -72057594037927936.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, -72057594037927937.5L, -72057594037927938.0L, INEXACT_EXCEPTION, -72057594037927938.0L, INEXACT_EXCEPTION, -72057594037927937.0L, INEXACT_EXCEPTION, -72057594037927937.0L, INEXACT_EXCEPTION),
 
-static const struct test_f_f_data rint_towardzero_test_data[] =
-  {
-    TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.5, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.5, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.5, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.0, -1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.5, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2.0, -2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.1, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.25, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.625, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.1, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.25, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.625, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1048576.75, 1048576.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2097152.75, 2097152.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1048576.75, -1048576.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2097152.75, -2097152.0, INEXACT_EXCEPTION),
-#ifndef TEST_FLOAT
-    TEST_f_f (rint, 70368744177664.75, 70368744177664.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 140737488355328.75, 140737488355328.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 281474976710656.75, 281474976710656.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 562949953421312.75, 562949953421312.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -70368744177664.75, -70368744177664.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -140737488355328.75, -140737488355328.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -281474976710656.75, -281474976710656.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -562949953421312.75, -562949953421312.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0, INEXACT_EXCEPTION),
-#endif
-#ifdef TEST_LDOUBLE
-    /* The result can only be represented in long double.  */
-    TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L, INEXACT_EXCEPTION),
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370494.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION),
-# endif
-    TEST_f_f (rint, -4503599627370495.5L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.75L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370497.5L, -4503599627370497.0L, INEXACT_EXCEPTION),
 # if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370494.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 10141204801825835211973625643007.5L, 10141204801825835211973625643007.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643007.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 10141204801825835211973625643008.75L, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION, 10141204801825835211973625643008.0L, INEXACT_EXCEPTION, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION),
+    TEST_f_f (rint, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION, 10141204801825835211973625643010.0L, INEXACT_EXCEPTION, 10141204801825835211973625643009.0L, INEXACT_EXCEPTION, 10141204801825835211973625643010.0L, INEXACT_EXCEPTION),
 # endif
 #endif
   };
 
 static void
-rint_test_towardzero (void)
-{
-  START (rint_towardzero, 1);
-  RUN_TEST_LOOP_f_f (rint, rint_towardzero_test_data, FE_TOWARDZERO);
-  END;
-}
-
-static const struct test_f_f_data rint_downward_test_data[] =
-  {
-    TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.5, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.5, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.5, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.0, -1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.5, -2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2.0, -2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.1, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.25, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.625, 0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.1, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.25, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.625, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1048576.75, 1048576.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2097152.75, 2097152.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1048576.75, -1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2097152.75, -2097153.0, INEXACT_EXCEPTION),
-#ifndef TEST_FLOAT
-    TEST_f_f (rint, 70368744177664.75, 70368744177664.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 140737488355328.75, 140737488355328.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 281474976710656.75, 281474976710656.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 562949953421312.75, 562949953421312.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -70368744177664.75, -70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -140737488355328.75, -140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -281474976710656.75, -281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -562949953421312.75, -562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0, INEXACT_EXCEPTION),
-#endif
-#ifdef TEST_LDOUBLE
-    /* The result can only be represented in long double.  */
-    TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L, INEXACT_EXCEPTION),
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370494.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION),
-# endif
-    TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.25L, -4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5L, -4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L, INEXACT_EXCEPTION),
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-rint_test_downward (void)
-{
-  START (rint_downward, 1);
-  RUN_TEST_LOOP_f_f (rint, rint_downward_test_data, FE_DOWNWARD);
-  END;
-}
-
-static const struct test_f_f_data rint_upward_test_data[] =
-  {
-    TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.5, 2.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.5, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.5, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.0, -1.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1.5, -1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2.0, -2.0, NO_INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.1, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.25, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 0.625, 1.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.1, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.25, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -0.625, -0.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1048576.75, 1048577.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 2097152.75, 2097153.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1048576.75, -1048576.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -2097152.75, -2097152.0, INEXACT_EXCEPTION),
-#ifndef TEST_FLOAT
-    TEST_f_f (rint, 70368744177664.75, 70368744177665.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 140737488355328.75, 140737488355329.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 281474976710656.75, 281474976710657.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 562949953421312.75, 562949953421313.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -70368744177664.75, -70368744177664.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -140737488355328.75, -140737488355328.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -281474976710656.75, -281474976710656.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -562949953421312.75, -562949953421312.0, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0, INEXACT_EXCEPTION),
-#endif
-#ifdef TEST_LDOUBLE
-    /* The result can only be represented in long double.  */
-    TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.25L, 4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5L, 4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L, INEXACT_EXCEPTION),
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L, INEXACT_EXCEPTION),
-# endif
-    TEST_f_f (rint, -4503599627370495.5L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.75L, -4503599627370496.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370497.5L, -4503599627370497.0L, INEXACT_EXCEPTION),
-# if LDBL_MANT_DIG > 100
-    TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370494.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370495.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370496.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740994.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L, INEXACT_EXCEPTION),
-
-    TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740991.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740992.0L, INEXACT_EXCEPTION),
-    TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
-# endif
-#endif
-  };
-
-static void
-rint_test_upward (void)
+rint_test (void)
 {
-  START (rint_upward, 1);
-  RUN_TEST_LOOP_f_f (rint, rint_upward_test_data, FE_UPWARD);
-  END;
+  ALL_RM_TEST (rint, 1, rint_test_data, RUN_TEST_LOOP_f_f, END);
 }
 
 static const struct test_f_f_data round_test_data[] =
@@ -11782,20 +10756,8 @@ main (int argc, char **argv)
   floor_test ();
   nearbyint_test ();
   rint_test ();
-  rint_test_tonearest ();
-  rint_test_towardzero ();
-  rint_test_downward ();
-  rint_test_upward ();
   lrint_test ();
-  lrint_test_tonearest ();
-  lrint_test_towardzero ();
-  lrint_test_downward ();
-  lrint_test_upward ();
   llrint_test ();
-  llrint_test_tonearest ();
-  llrint_test_towardzero ();
-  llrint_test_downward ();
-  llrint_test_upward ();
   round_test ();
   lround_test ();
   llround_test ();