diff mbox

Fix cexp, ccos, ccosh, csin, csinh spurious underflows (bug 18594) [committed]

Message ID alpine.DEB.2.10.1506242105260.17197@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers June 24, 2015, 9:05 p.m. UTC
cexp, ccos, ccosh, csin and csinh have spurious underflows in cases
where they compute sin of the smallest normal, that produces an
underflow exception (depending on which sin implementation is in use)
but the final result does not underflow.  ctan and ctanh may also have
such underflows, or they may be latent (the issue there is that
e.g. ctan (DBL_MIN) should, rounded upwards, be the next double value
above DBL_MIN, which under glibc's accuracy goals may not have an
underflow exception, but the intermediate computation of sin (DBL_MIN)
would legitimately underflow on before-rounding architectures).

This patch fixes all those functions so they use plain comparisons (>
DBL_MIN etc.) instead of comparing the result of fpclassify with
FP_SUBNORMAL (in all these cases, we already know the number being
compared is finite).  Note that in the case of csin / csinf / csinl,
there is no need for fabs calls in the comparison because the real
part has already been reduced to its absolute value.

As the patch fixes the failures that previously obstructed moving
tests of cexp to use ALL_RM_TEST, those tests are moved to ALL_RM_TEST
by the patch (two functions remain yet to be converted).

Tested for x86_64 and x86 and ulps updated accordingly.  Committed.

(auto-libm-test-out diffs omitted below.)

2015-06-24  Joseph Myers  <joseph@codesourcery.com>

	[BZ #18594]
	* math/s_ccosh.c (__ccosh): Compare with least normal value
	instead of comparing class with FP_SUBNORMAL.
	* math/s_ccoshf.c (__ccoshf): Likewise.
	* math/s_ccoshl.c (__ccoshl): Likewise.
	* math/s_cexp.c (__cexp): Likewise.
	* math/s_cexpf.c (__cexpf): Likewise.
	* math/s_cexpl.c (__cexpl): Likewise.
	* math/s_csin.c (__csin): Likewise.
	* math/s_csinf.c (__csinf): Likewise.
	* math/s_csinh.c (__csinh): Likewise.
	* math/s_csinhf.c (__csinhf): Likewise.
	* math/s_csinhl.c (__csinhl): Likewise.
	* math/s_csinl.c (__csinl): Likewise.
	* math/s_ctan.c (__ctan): Likewise.
	* math/s_ctanf.c (__ctanf): Likewise.
	* math/s_ctanh.c (__ctanh): Likewise.
	* math/s_ctanhf.c (__ctanhf): Likewise.
	* math/s_ctanhl.c (__ctanhl): Likewise.
	* math/s_ctanl.c (__ctanl): Likewise.
	* math/auto-libm-test-in: Add more tests of ccos, ccosh, cexp,
	csin, csinh, ctan and ctanh.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (cexp_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
diff mbox

Patch

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 89a2684..75cf545 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -496,6 +496,11 @@  ccos 0x1p-16434 22730
 ccos min_subnorm_p120 0x1p-120
 ccos 0x1p-120 min_subnorm_p120
 
+ccos min 1
+ccos -min 1
+ccos min_subnorm 80
+ccos -min_subnorm 80
+
 ccosh 0.0 0.0
 ccosh -0 0.0
 ccosh 0.0 -0
@@ -524,6 +529,11 @@  ccosh 22730 0x1p-16434
 ccosh min_subnorm_p120 0x1p-120
 ccosh 0x1p-120 min_subnorm_p120
 
+ccosh 1 min
+ccosh 1 -min
+ccosh 80 min_subnorm
+ccosh 80 -min_subnorm
+
 cexp 0 0
 cexp -0 0
 cexp 0 -0
@@ -558,6 +568,11 @@  cexp 1e6 0
 cexp 1e6 min
 cexp 1e6 -min
 
+cexp 1 min
+cexp 1 -min
+cexp 80 min_subnorm
+cexp 80 -min_subnorm
+
 cexp min min_subnorm
 cexp min -min_subnorm
 
@@ -985,6 +1000,11 @@  csin 0x1p-149 180
 csin 0x1p-1074 1440
 csin 0x1p-16434 22730
 
+csin min 1
+csin -min 1
+csin min_subnorm 80
+csin -min_subnorm 80
+
 csinh 0.0 0.0
 csinh -0 0.0
 csinh 0.0 -0
@@ -1015,6 +1035,11 @@  csinh 180 0x1p-149
 csinh 1440 0x1p-1074
 csinh 22730 0x1p-16434
 
+csinh 1 min
+csinh 1 -min
+csinh 80 min_subnorm
+csinh 80 -min_subnorm
+
 csqrt 0 0
 csqrt 0 -0
 csqrt -0 0
@@ -1132,6 +1157,12 @@  ctan 0x1.921fb6p+0 0x1p-149
 ctan 0x1.921fb54442d18p+0 0x1p-1074
 ctan 0x1.921fb54442d1846ap+0 0x1p-16445
 
+# Bug 18595: underflow exception may be missing
+ctan min 0 missing-underflow
+ctan -min 0 missing-underflow
+ctan min_subnorm 0 missing-underflow
+ctan -min_subnorm 0 missing-underflow
+
 ctanh 0 0
 ctanh 0 -0
 ctanh -0 0
@@ -1166,6 +1197,12 @@  ctanh 0x1p-149 0x1.921fb6p+0
 ctanh 0x1p-1074 0x1.921fb54442d18p+0
 ctanh 0x1p-16445 0x1.921fb54442d1846ap+0
 
+# Bug 18595: underflow exception may be missing
+ctanh 0 min missing-underflow
+ctanh 0 -min missing-underflow
+ctanh 0 min_subnorm missing-underflow
+ctanh 0 -min_subnorm missing-underflow
+
 erf 0
 erf -0
 erf 0.125
diff --git a/math/libm-test.inc b/math/libm-test.inc
index cc86e3a..4987161 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -6040,9 +6040,7 @@  static const struct test_c_c_data cexp_test_data[] =
 static void
 cexp_test (void)
 {
-  START (cexp,, 0);
-  RUN_TEST_LOOP_c_c (cexp, cexp_test_data, );
-  END_COMPLEX;
+  ALL_RM_TEST (cexp, 0, cexp_test_data, RUN_TEST_LOOP_c_c, END_COMPLEX);
 }
 
 
diff --git a/math/s_ccosh.c b/math/s_ccosh.c
index 284ff21..664731a 100644
--- a/math/s_ccosh.c
+++ b/math/s_ccosh.c
@@ -39,7 +39,7 @@  __ccosh (__complex__ double x)
 	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
 	  double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	    {
 	      __sincos (__imag__ x, &sinix, &cosix);
 	    }
@@ -113,7 +113,7 @@  __ccosh (__complex__ double x)
 	  /* Imaginary part is finite.  */
 	  double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	    {
 	      __sincos (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_ccoshf.c b/math/s_ccoshf.c
index be07944..6f61efc 100644
--- a/math/s_ccoshf.c
+++ b/math/s_ccoshf.c
@@ -39,7 +39,7 @@  __ccoshf (__complex__ float x)
 	  const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
 	  float sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	    {
 	      __sincosf (__imag__ x, &sinix, &cosix);
 	    }
@@ -113,7 +113,7 @@  __ccoshf (__complex__ float x)
 	  /* Imaginary part is finite.  */
 	  float sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	    {
 	      __sincosf (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_ccoshl.c b/math/s_ccoshl.c
index 2160390..874786d 100644
--- a/math/s_ccoshl.c
+++ b/math/s_ccoshl.c
@@ -39,7 +39,7 @@  __ccoshl (__complex__ long double x)
 	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	    {
 	      __sincosl (__imag__ x, &sinix, &cosix);
 	    }
@@ -113,7 +113,7 @@  __ccoshl (__complex__ long double x)
 	  /* Imaginary part is finite.  */
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	    {
 	      __sincosl (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_cexp.c b/math/s_cexp.c
index 9116e2b..06c5b63 100644
--- a/math/s_cexp.c
+++ b/math/s_cexp.c
@@ -39,7 +39,7 @@  __cexp (__complex__ double x)
 	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
 	  double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	    {
 	      __sincos (__imag__ x, &sinix, &cosix);
 	    }
@@ -115,7 +115,7 @@  __cexp (__complex__ double x)
 	    {
 	      double sinix, cosix;
 
-	      if (__glibc_likely (icls != FP_SUBNORMAL))
+	      if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 		{
 		  __sincos (__imag__ x, &sinix, &cosix);
 		}
diff --git a/math/s_cexpf.c b/math/s_cexpf.c
index fac1a17..35ff36c 100644
--- a/math/s_cexpf.c
+++ b/math/s_cexpf.c
@@ -39,7 +39,7 @@  __cexpf (__complex__ float x)
 	  const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
 	  float sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	    {
 	      __sincosf (__imag__ x, &sinix, &cosix);
 	    }
@@ -115,7 +115,7 @@  __cexpf (__complex__ float x)
 	    {
 	      float sinix, cosix;
 
-	      if (__glibc_likely (icls != FP_SUBNORMAL))
+	      if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 		{
 		  __sincosf (__imag__ x, &sinix, &cosix);
 		}
diff --git a/math/s_cexpl.c b/math/s_cexpl.c
index 9309b1f..e2e703f 100644
--- a/math/s_cexpl.c
+++ b/math/s_cexpl.c
@@ -39,7 +39,7 @@  __cexpl (__complex__ long double x)
 	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	    {
 	      __sincosl (__imag__ x, &sinix, &cosix);
 	    }
@@ -115,7 +115,7 @@  __cexpl (__complex__ long double x)
 	    {
 	      long double sinix, cosix;
 
-	      if (__glibc_likely (icls != FP_SUBNORMAL))
+	      if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	        {
 		  __sincosl (__imag__ x, &sinix, &cosix);
 	        }
diff --git a/math/s_csin.c b/math/s_csin.c
index ceee25f..e926d7e 100644
--- a/math/s_csin.c
+++ b/math/s_csin.c
@@ -42,7 +42,7 @@  __csin (__complex__ double x)
 	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
 	  double sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > DBL_MIN))
 	    {
 	      __sincos (__real__ x, &sinix, &cosix);
 	    }
@@ -136,7 +136,7 @@  __csin (__complex__ double x)
 	  /* Real part is finite.  */
 	  double sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > DBL_MIN))
 	    {
 	      __sincos (__real__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_csinf.c b/math/s_csinf.c
index daca689..52cce4b 100644
--- a/math/s_csinf.c
+++ b/math/s_csinf.c
@@ -42,7 +42,7 @@  __csinf (__complex__ float x)
 	  const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
 	  float sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > FLT_MIN))
 	    {
 	      __sincosf (__real__ x, &sinix, &cosix);
 	    }
@@ -136,7 +136,7 @@  __csinf (__complex__ float x)
 	  /* Real part is finite.  */
 	  float sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > FLT_MIN))
 	    {
 	      __sincosf (__real__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_csinh.c b/math/s_csinh.c
index d940c97..7aa69e7 100644
--- a/math/s_csinh.c
+++ b/math/s_csinh.c
@@ -42,7 +42,7 @@  __csinh (__complex__ double x)
 	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
 	  double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	    {
 	      __sincos (__imag__ x, &sinix, &cosix);
 	    }
@@ -130,7 +130,7 @@  __csinh (__complex__ double x)
 	  /* Imaginary part is finite.  */
 	  double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	    {
 	      __sincos (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_csinhf.c b/math/s_csinhf.c
index 4e0bc03..72e4800 100644
--- a/math/s_csinhf.c
+++ b/math/s_csinhf.c
@@ -42,7 +42,7 @@  __csinhf (__complex__ float x)
 	  const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
 	  float sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	    {
 	      __sincosf (__imag__ x, &sinix, &cosix);
 	    }
@@ -130,7 +130,7 @@  __csinhf (__complex__ float x)
 	  /* Imaginary part is finite.  */
 	  float sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	    {
 	      __sincosf (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_csinhl.c b/math/s_csinhl.c
index eeb2212..62243da 100644
--- a/math/s_csinhl.c
+++ b/math/s_csinhl.c
@@ -42,7 +42,7 @@  __csinhl (__complex__ long double x)
 	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	    {
 	      __sincosl (__imag__ x, &sinix, &cosix);
 	    }
@@ -130,7 +130,7 @@  __csinhl (__complex__ long double x)
 	  /* Imaginary part is finite.  */
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (icls != FP_SUBNORMAL))
+	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	    {
 	      __sincosl (__imag__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_csinl.c b/math/s_csinl.c
index a4b1eb5..7908aee 100644
--- a/math/s_csinl.c
+++ b/math/s_csinl.c
@@ -42,7 +42,7 @@  __csinl (__complex__ long double x)
 	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > LDBL_MIN))
 	    {
 	      __sincosl (__real__ x, &sinix, &cosix);
 	    }
@@ -136,7 +136,7 @@  __csinl (__complex__ long double x)
 	  /* Real part is finite.  */
 	  long double sinix, cosix;
 
-	  if (__glibc_likely (rcls != FP_SUBNORMAL))
+	  if (__glibc_likely (__real__ x > LDBL_MIN))
 	    {
 	      __sincosl (__real__ x, &sinix, &cosix);
 	    }
diff --git a/math/s_ctan.c b/math/s_ctan.c
index 97a7a03..eaf31fa 100644
--- a/math/s_ctan.c
+++ b/math/s_ctan.c
@@ -53,12 +53,11 @@  __ctan (__complex__ double x)
       double sinrx, cosrx;
       double den;
       const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
-      int rcls = fpclassify (__real__ x);
 
       /* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
 	 = (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
 
-      if (__glibc_likely (rcls != FP_SUBNORMAL))
+      if (__glibc_likely (fabs (__real__ x) > DBL_MIN))
 	{
 	  __sincos (__real__ x, &sinrx, &cosrx);
 	}
diff --git a/math/s_ctanf.c b/math/s_ctanf.c
index 5f1adc8..e0a6b8f 100644
--- a/math/s_ctanf.c
+++ b/math/s_ctanf.c
@@ -57,7 +57,7 @@  __ctanf (__complex__ float x)
       /* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
 	 = (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
 
-      if (__glibc_likely (fpclassify(__real__ x) != FP_SUBNORMAL))
+      if (__glibc_likely (fabsf (__real__ x) > FLT_MIN))
 	{
 	  __sincosf (__real__ x, &sinrx, &cosrx);
 	}
diff --git a/math/s_ctanh.c b/math/s_ctanh.c
index ca4c0e2..1347d07 100644
--- a/math/s_ctanh.c
+++ b/math/s_ctanh.c
@@ -53,12 +53,11 @@  __ctanh (__complex__ double x)
       double sinix, cosix;
       double den;
       const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
-      int icls = fpclassify (__imag__ x);
 
       /* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
 	 = (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2).  */
 
-      if (__glibc_likely (icls != FP_SUBNORMAL))
+      if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
 	{
 	  __sincos (__imag__ x, &sinix, &cosix);
 	}
diff --git a/math/s_ctanhf.c b/math/s_ctanhf.c
index 1405f3f..14e1371 100644
--- a/math/s_ctanhf.c
+++ b/math/s_ctanhf.c
@@ -57,7 +57,7 @@  __ctanhf (__complex__ float x)
       /* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
 	 = (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2).  */
 
-      if (__glibc_likely (fpclassify(__imag__ x) != FP_SUBNORMAL))
+      if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
 	{
 	  __sincosf (__imag__ x, &sinix, &cosix);
 	}
diff --git a/math/s_ctanhl.c b/math/s_ctanhl.c
index fa11db7..6b9dfc5 100644
--- a/math/s_ctanhl.c
+++ b/math/s_ctanhl.c
@@ -60,12 +60,11 @@  __ctanhl (__complex__ long double x)
       long double sinix, cosix;
       long double den;
       const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
-      int icls = fpclassify (__imag__ x);
 
       /* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
 	 = (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2).  */
 
-      if (__glibc_likely (icls != FP_SUBNORMAL))
+      if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
 	{
 	  __sincosl (__imag__ x, &sinix, &cosix);
 	}
diff --git a/math/s_ctanl.c b/math/s_ctanl.c
index 1f92755..0fd0039 100644
--- a/math/s_ctanl.c
+++ b/math/s_ctanl.c
@@ -60,12 +60,11 @@  __ctanl (__complex__ long double x)
       long double sinrx, cosrx;
       long double den;
       const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
-      int rcls = fpclassify (__real__ x);
 
       /* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
 	 = (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
 
-      if (__glibc_likely (rcls != FP_SUBNORMAL))
+      if (__glibc_likely (fabsl (__real__ x) > LDBL_MIN))
 	{
 	  __sincosl (__real__ x, &sinrx, &cosrx);
 	}
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index f319749..c9b565f 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -668,6 +668,8 @@  double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ccosh":
 double: 1
@@ -741,6 +743,54 @@  ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: Real part of "cexp_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "cexp_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "cexp_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "cexp_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "cexp_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "cexp_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
 Function: Real part of "clog":
 double: 3
 float: 2
@@ -1052,6 +1102,8 @@  double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "csinh_downward":
 double: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 101831f..48d11a6 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -744,6 +744,8 @@  double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ccosh":
 double: 1
@@ -817,6 +819,54 @@  ifloat: 2
 ildouble: 1
 ldouble: 1
 
+Function: Real part of "cexp_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "cexp_downward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "cexp_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "cexp_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "cexp_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "cexp_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
 Function: Real part of "clog":
 double: 3
 float: 2
@@ -1146,6 +1196,8 @@  double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "csinh_downward":
 double: 2