diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 5975631..7c80192 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -61,9 +61,8 @@ asin -0x0.ffffffffffffp0
 asin 0x0.ffffffffffffffffp0
 asin -0x0.ffffffffffffffffp0
 # Bug 16351: underflow exception may be missing.
-# Bug 16599: spurious underflow may occur.
 asin min missing-underflow
-asin -min missing-underflow spurious-underflow:dbl-64:x86
+asin -min missing-underflow
 asin min_subnorm missing-underflow
 asin -min_subnorm missing-underflow
 
@@ -175,9 +174,8 @@ atanh 0x1p-5
 atanh 0x1p-10
 atanh 0x1.2345p-20
 # Bug 16352: underflow exception may be missing.
-# Bug 16357: spurious underflow may occur.
-atanh min missing-underflow spurious-underflow:ldbl-96-intel:x86
-atanh -min missing-underflow spurious-underflow:ldbl-96-intel:x86
+atanh min missing-underflow
+atanh -min missing-underflow
 atanh min_subnorm missing-underflow
 atanh -min_subnorm missing-underflow
 
diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
index 61097e4..132cca2 100644
--- a/math/gen-auto-libm-tests.c
+++ b/math/gen-auto-libm-tests.c
@@ -171,6 +171,8 @@ typedef struct
   int min_exp;
   /* The largest normal value.  */
   mpfr_t max;
+  /* The value 0.5ulp above the least positive normal value.  */
+  mpfr_t min_plus_half;
   /* The least positive normal value, 2^(MIN_EXP-1).  */
   mpfr_t min;
   /* The greatest positive subnormal value.  */
@@ -183,13 +185,13 @@ typedef struct
    enumeration.  */
 static fp_format_desc fp_formats[fp_num_formats] =
   {
-    { "flt-32", "f", NULL, 24, 128, -125, {}, {}, {}, {} },
-    { "dbl-64", "", NULL, 53, 1024, -1021, {}, {}, {}, {} },
-    { "ldbl-96-intel", "L", NULL, 64, 16384, -16381, {}, {}, {}, {} },
-    { "ldbl-96-m68k", "L", NULL, 64, 16384, -16382, {}, {}, {}, {} },
-    { "ldbl-128", "L", NULL, 113, 16384, -16381, {}, {}, {}, {} },
+    { "flt-32", "f", NULL, 24, 128, -125, {}, {}, {}, {}, {} },
+    { "dbl-64", "", NULL, 53, 1024, -1021, {}, {}, {}, {}, {} },
+    { "ldbl-96-intel", "L", NULL, 64, 16384, -16381, {}, {}, {}, {}, {} },
+    { "ldbl-96-m68k", "L", NULL, 64, 16384, -16382, {}, {}, {}, {}, {} },
+    { "ldbl-128", "L", NULL, 113, 16384, -16381, {}, {}, {}, {}, {} },
     { "ldbl-128ibm", "L", "0x1.fffffffffffff7ffffffffffff8p+1023",
-      106, 1024, -968, {}, {}, {}, {} },
+      106, 1024, -968, {}, {}, {}, {}, {} },
   };
 
 /* The supported rounding modes.  */
@@ -702,6 +704,10 @@ init_fp_formats ()
       assert_exact (mpfr_set_ui_2exp (fp_formats[f].min, 1,
 				      fp_formats[f].min_exp - 1,
 				      MPFR_RNDN));
+      mpfr_init2 (fp_formats[f].min_plus_half, fp_formats[f].mant_dig + 1);
+      assert_exact (mpfr_set (fp_formats[f].min_plus_half,
+			      fp_formats[f].min, MPFR_RNDN));
+      mpfr_nextabove (fp_formats[f].min_plus_half);
       mpfr_init2 (fp_formats[f].subnorm_max, fp_formats[f].mant_dig);
       assert_exact (mpfr_set (fp_formats[f].subnorm_max, fp_formats[f].min,
 			      MPFR_RNDN));
@@ -1841,8 +1847,9 @@ output_for_one_input_case (FILE *fp, const char *filename, test_function *tf,
 				    <= 0));
 			  may_underflow
 			    |= (!mpfr_zero_p (generic_outputs[i].value.f)
-				&& mpfr_cmpabs (generic_outputs[i].value.f,
-						fp_formats[f].min) <= 0);
+				&& (mpfr_cmpabs (generic_outputs[i].value.f,
+						 fp_formats[f].min_plus_half)
+				    <= 0));
 			}
 		      /* If the result is an exact zero, the sign may
 			 depend on the rounding mode, so recompute it
diff --git a/math/libm-test.inc b/math/libm-test.inc
index a8ebecd..9c4c2bf 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -7823,9 +7823,7 @@ static const struct test_f_f_data log1p_test_data[] =
 static void
 log1p_test (void)
 {
-  START (log1p, 0);
-  RUN_TEST_LOOP_f_f (log1p, log1p_test_data, );
-  END;
+  ALL_RM_TEST (log1p, 0, log1p_test_data, RUN_TEST_LOOP_f_f, END);
 }
 
 
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 1885be7..a82de19 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1288,6 +1288,30 @@ Function: "log1p":
 ildouble: 1
 ldouble: 1
 
+Function: "log1p_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "log1p_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "log1p_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "log_downward":
 ildouble: 1
 ldouble: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 670f2da..e2fa9b2 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1362,6 +1362,30 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "log1p_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "log1p_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "log1p_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "log_downward":
 float: 1
 ifloat: 1
