This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCHv2 11/11] Convert remaining complex function to generated files


Convert cpow, clog, clog10, cexp, csqrt, and cproj functions
into generated templates.  With the exception of clog10, the
transformation is identical to the previous patches.  clog10
needs some extra hackery as the __clog10* symbol was exposed
in days past, and thus required some extra hackery to
preserve this.

	* math/Makefile (libm-gen-calls): Add cpow, clog, clog10
	cexp, cproj.
	(libm-calls): Remove the above.

	* math/s_cexp.c: Refactor into
	* math/b_cexp.c: New file
	* math/s_cexpf.c: Removed
	* math/s_cexpl.c: Removed

	* math/s_clog10.c: Refactor into
	* math/b_clog10.c: New file
	* math/s_clog10f.c: Removed
	* math/s_clog10l.c: Removed

	* math/s_cpow.c: Refactor into
	* math/b_cpow.c: New file
	* math/s_cpowf.c: Removed
	* math/s_cpowl.c: Removed

	* math/s_clog.c: Refactor into
	* math/b_clog.c: New file
	* math/s_clogf.c: Removed
	* math/s_clogl.c: Removed

	* math/s_cproj.c: Refactor into
	* math/b_cproj.c: New file
	* math/s_cprojf.c: Removed
	* math/s_cprojl.c: Removed

	* math/s_csqrt.c: Refactor into
	* math/b_csqrt.c: New file
	* math/s_csqrtf.c: Removed
	* math/s_csqrtl.c: Removed

	* sysdeps/alpha/fpu/Makefile: Add overrides for _Complex
	float functions.
	* sysdeps/alpha/fpu/s_cexpf.c: Update to use tempated version.
	* sysdeps/alpha/fpu/s_clog10f.c: Update to use tempated version.
	* sysdeps/alpha/fpu/s_clogf.c: Update to use tempated version.
	* sysdeps/alpha/fpu/s_cpowf.c: Update to use tempated version.
	* sysdeps/alpha/fpu/s_cprojf.c: Update to use tempated version.
	* sysdeps/alpha/fpu/s_csqrtf.c: Update to use tempated version.

	* sysdeps/ieee754/ldbl-opt/math-type-macros.h: Add versioning
	information for newly refactored functions.

	* sysdeps/ieee754/ldbl-opt/s_cexp.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_cexpl.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_clog.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_clog10.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_clog10l.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_clogl.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_cpow.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_cpowl.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_cproj.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_cprojl.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_csqrt.c: Removed
	* sysdeps/ieee754/ldbl-opt/s_csqrtl.c: Removed

	* sysdeps/m68k/m680x0/fpu/s_cexp.c: Refactor into
	* sysdeps/m68k/m680x0/fpu/b_cexp.c: New file
	* sysdeps/m68k/m680x0/fpu/s_cexpf.c: Removed
	* sysdeps/m68k/m680x0/fpu/s_cexpl.c: Removed
---
 math/Makefile                                  |   5 +-
 math/b_cexp.c                                  |  66 +++++-----
 math/b_clog.c                                  |  85 ++++++-------
 math/b_clog10.c                                | 105 +++++++++-------
 math/b_cpow.c                                  |  18 +--
 math/b_cproj.c                                 |  19 +--
 math/b_csqrt.c                                 | 105 ++++++++--------
 math/s_cexp.c                                  | 157 -----------------------
 math/s_cexpf.c                                 | 155 -----------------------
 math/s_cexpl.c                                 | 153 -----------------------
 math/s_clog.c                                  | 118 ------------------
 math/s_clog10.c                                | 124 -------------------
 math/s_clog10f.c                               | 122 ------------------
 math/s_clog10l.c                               | 127 -------------------
 math/s_clogf.c                                 | 116 -----------------
 math/s_clogl.c                                 | 121 ------------------
 math/s_cpow.c                                  |  33 -----
 math/s_cpowf.c                                 |  31 -----
 math/s_cpowl.c                                 |  29 -----
 math/s_cproj.c                                 |  44 -------
 math/s_cprojf.c                                |  42 -------
 math/s_cprojl.c                                |  40 ------
 math/s_csqrt.c                                 | 165 -------------------------
 math/s_csqrtf.c                                | 163 ------------------------
 math/s_csqrtl.c                                | 161 ------------------------
 sysdeps/alpha/fpu/Makefile                     |   6 +-
 sysdeps/alpha/fpu/s_cexpf.c                    |  13 +-
 sysdeps/alpha/fpu/s_clog10f.c                  |  15 ++-
 sysdeps/alpha/fpu/s_clogf.c                    |  13 +-
 sysdeps/alpha/fpu/s_cpowf.c                    |  13 +-
 sysdeps/alpha/fpu/s_cprojf.c                   |  13 +-
 sysdeps/alpha/fpu/s_csqrtf.c                   |  13 +-
 sysdeps/ieee754/ldbl-opt/math-type-macros.h    |   7 ++
 sysdeps/ieee754/ldbl-opt/s_cexp.c              |   6 -
 sysdeps/ieee754/ldbl-opt/s_cexpl.c             |   6 -
 sysdeps/ieee754/ldbl-opt/s_clog.c              |   6 -
 sysdeps/ieee754/ldbl-opt/s_clog10.c            |   7 --
 sysdeps/ieee754/ldbl-opt/s_clog10l.c           |  10 --
 sysdeps/ieee754/ldbl-opt/s_clogl.c             |   6 -
 sysdeps/ieee754/ldbl-opt/s_cpow.c              |   6 -
 sysdeps/ieee754/ldbl-opt/s_cpowl.c             |   6 -
 sysdeps/ieee754/ldbl-opt/s_cproj.c             |   6 -
 sysdeps/ieee754/ldbl-opt/s_cprojl.c            |   6 -
 sysdeps/ieee754/ldbl-opt/s_csqrt.c             |   6 -
 sysdeps/ieee754/ldbl-opt/s_csqrtl.c            |   6 -
 sysdeps/m68k/m680x0/fpu/{s_cexp.c => b_cexp.c} |  15 +--
 sysdeps/m68k/m680x0/fpu/s_cexpf.c              |   3 -
 sysdeps/m68k/m680x0/fpu/s_cexpl.c              |   3 -
 48 files changed, 282 insertions(+), 2213 deletions(-)
 delete mode 100644 math/s_cexp.c
 delete mode 100644 math/s_cexpf.c
 delete mode 100644 math/s_cexpl.c
 delete mode 100644 math/s_clog.c
 delete mode 100644 math/s_clog10.c
 delete mode 100644 math/s_clog10f.c
 delete mode 100644 math/s_clog10l.c
 delete mode 100644 math/s_clogf.c
 delete mode 100644 math/s_clogl.c
 delete mode 100644 math/s_cpow.c
 delete mode 100644 math/s_cpowf.c
 delete mode 100644 math/s_cpowl.c
 delete mode 100644 math/s_cproj.c
 delete mode 100644 math/s_cprojf.c
 delete mode 100644 math/s_cprojl.c
 delete mode 100644 math/s_csqrt.c
 delete mode 100644 math/s_csqrtf.c
 delete mode 100644 math/s_csqrtl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cexp.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cexpl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_clog.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_clog10.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_clog10l.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_clogl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cpow.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cpowl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cproj.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_cprojl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_csqrt.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_csqrtl.c
 rename sysdeps/m68k/m680x0/fpu/{s_cexp.c => b_cexp.c} (94%)
 delete mode 100644 sysdeps/m68k/m680x0/fpu/s_cexpf.c
 delete mode 100644 sysdeps/m68k/m680x0/fpu/s_cexpl.c

diff --git a/math/Makefile b/math/Makefile
index 63a385d..b230eb4 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -55,7 +55,8 @@ libm-support = s_lib_version s_matherr s_signgam			\
 # will match the name s_<func><type suffix>
 gen-libm-calls = g_carg_F g_conj_F g_cimag_F g_creal_F g_cabs_F g_cacos_F \
 	g_cacosh_F g_ccos_F g_ccosh_F g_casin_F g_csin_F g_casinh_F	  \
-	g_k_casinh_F g_csinh_F g_catanh_F g_catan_F g_ctan_F g_ctanh_F
+	g_k_casinh_F g_csinh_F g_catanh_F g_catan_F g_ctan_F g_ctanh_F	  \
+	g_cexp_F g_clog_F g_cproj_F g_csqrt_F g_cpow_F g_clog10_F
 
 libm-calls =								  \
 	e_acosF e_acoshF e_asinF e_atan2F e_atanhF e_coshF e_expF e_fmodF \
@@ -73,8 +74,6 @@ libm-calls =								  \
 	w_ilogbF							  \
 	s_fpclassifyF s_fmaxF s_fminF s_fdimF s_nanF s_truncF		  \
 	s_remquoF e_log2F e_exp2F s_roundF s_nearbyintF s_sincosF	  \
-	s_cexpF s_clogF							  \
-	s_csqrtF s_cpowF s_cprojF s_clog10F				  \
 	s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F w_log2F	  \
 	s_issignalingF $(calls:s_%=m_%) x2y2m1F				  \
 	gamma_productF lgamma_negF lgamma_productF			  \
diff --git a/math/b_cexp.c b/math/b_cexp.c
index 3a476bd..a84a472 100644
--- a/math/b_cexp.c
+++ b/math/b_cexp.c
@@ -1,4 +1,4 @@
-/* Return value of complex exponential function for double complex value.
+/* Return value of complex exponential function for a float type.
    Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,10 +23,10 @@
 #include <math_private.h>
 #include <float.h>
 
-__complex__ double
-__cexp (__complex__ double x)
+CFLOAT
+M_DECL_FUNC (__cexp) (CFLOAT x)
 {
-  __complex__ double retval;
+  CFLOAT retval;
   int rcls = fpclassify (__real__ x);
   int icls = fpclassify (__imag__ x);
 
@@ -36,22 +36,22 @@ __cexp (__complex__ double x)
       if (__glibc_likely (icls >= FP_ZERO))
 	{
 	  /* Imaginary part is finite.  */
-	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
-	  double sinix, cosix;
+	  const int t = (int) ((M_MAX_EXP - 1) * M_MLIT (M_LN2));
+	  FLOAT sinix, cosix;
 
-	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
+	  if (__glibc_likely (M_FABS (__imag__ x) > M_MIN))
 	    {
-	      __sincos (__imag__ x, &sinix, &cosix);
+	      M_SINCOS (__imag__ x, &sinix, &cosix);
 	    }
 	  else
 	    {
 	      sinix = __imag__ x;
-	      cosix = 1.0;
+	      cosix = 1;
 	    }
 
 	  if (__real__ x > t)
 	    {
-	      double exp_t = __ieee754_exp (t);
+	      FLOAT exp_t = M_EXP (t);
 	      __real__ x -= t;
 	      sinix *= exp_t;
 	      cosix *= exp_t;
@@ -65,12 +65,12 @@ __cexp (__complex__ double x)
 	  if (__real__ x > t)
 	    {
 	      /* Overflow (original real part of x > 3t).  */
-	      __real__ retval = DBL_MAX * cosix;
-	      __imag__ retval = DBL_MAX * sinix;
+	      __real__ retval = M_MAX * cosix;
+	      __imag__ retval = M_MAX * sinix;
 	    }
 	  else
 	    {
-	      double exp_val = __ieee754_exp (__real__ x);
+	      FLOAT exp_val = M_EXP (__real__ x);
 	      __real__ retval = exp_val * cosix;
 	      __imag__ retval = exp_val * sinix;
 	    }
@@ -80,8 +80,8 @@ __cexp (__complex__ double x)
 	{
 	  /* If the imaginary part is +-inf or NaN and the real part
 	     is not +-inf the result is NaN + iNaN.  */
-	  __real__ retval = __nan ("");
-	  __imag__ retval = __nan ("");
+	  __real__ retval = M_NAN;
+	  __imag__ retval = M_NAN;
 
 	  feraiseexcept (FE_INVALID);
 	}
@@ -92,56 +92,56 @@ __cexp (__complex__ double x)
       if (__glibc_likely (icls >= FP_ZERO))
 	{
 	  /* Imaginary part is finite.  */
-	  double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
+	  FLOAT value = signbit (__real__ x) ? 0 : M_HUGE_VAL;
 
 	  if (icls == FP_ZERO)
 	    {
-	      /* Imaginary part is 0.0.  */
+	      /* Imaginary part is 0.  */
 	      __real__ retval = value;
 	      __imag__ retval = __imag__ x;
 	    }
 	  else
 	    {
-	      double sinix, cosix;
+	      FLOAT sinix, cosix;
 
-	      if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
+	      if (__glibc_likely (M_FABS (__imag__ x) > M_MIN))
 		{
-		  __sincos (__imag__ x, &sinix, &cosix);
+		  M_SINCOS (__imag__ x, &sinix, &cosix);
 		}
 	      else
 		{
 		  sinix = __imag__ x;
-		  cosix = 1.0;
+		  cosix = 1;
 		}
 
-	      __real__ retval = __copysign (value, cosix);
-	      __imag__ retval = __copysign (value, sinix);
+	      __real__ retval = M_COPYSIGN (value, cosix);
+	      __imag__ retval = M_COPYSIGN (value, sinix);
 	    }
 	}
       else if (signbit (__real__ x) == 0)
 	{
-	  __real__ retval = HUGE_VAL;
-	  __imag__ retval = __nan ("");
+	  __real__ retval = M_HUGE_VAL;
+	  __imag__ retval = M_NAN;
 
 	  if (icls == FP_INFINITE)
 	    feraiseexcept (FE_INVALID);
 	}
       else
 	{
-	  __real__ retval = 0.0;
-	  __imag__ retval = __copysign (0.0, __imag__ x);
+	  __real__ retval = 0;
+	  __imag__ retval = M_COPYSIGN (0, __imag__ x);
 	}
     }
   else
     {
       /* If the real part is NaN the result is NaN + iNaN unless the
 	 imaginary part is zero.  */
-      __real__ retval = __nan ("");
+      __real__ retval = M_NAN;
       if (icls == FP_ZERO)
 	__imag__ retval = __imag__ x;
       else
 	{
-	  __imag__ retval = __nan ("");
+	  __imag__ retval = M_NAN;
 
 	  if (rcls != FP_NAN || icls != FP_NAN)
 	    feraiseexcept (FE_INVALID);
@@ -150,8 +150,8 @@ __cexp (__complex__ double x)
 
   return retval;
 }
-weak_alias (__cexp, cexp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cexp, __cexpl)
-weak_alias (__cexp, cexpl)
+declare_mgen_alias (__cexp, cexp)
+
+#if M_LIBM_NEED_COMPAT (cexp)
+  declare_mgen_libm_compat (__cexp, cexp)
 #endif
diff --git a/math/b_clog.c b/math/b_clog.c
index b546030..f42003f 100644
--- a/math/b_clog.c
+++ b/math/b_clog.c
@@ -22,97 +22,98 @@
 #include <math_private.h>
 #include <float.h>
 
-__complex__ double
-__clog (__complex__ double x)
+CFLOAT
+M_DECL_FUNC (__clog) (CFLOAT x)
 {
-  __complex__ double result;
+  CFLOAT result;
   int rcls = fpclassify (__real__ x);
   int icls = fpclassify (__imag__ x);
 
   if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
     {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
-      __imag__ result = __copysign (__imag__ result, __imag__ x);
+      /* Real and imaginary part are 0.  */
+      __imag__ result = signbit (__real__ x) ? (FLOAT) M_MLIT (M_PI) : 0;
+      __imag__ result = M_COPYSIGN (__imag__ result, __imag__ x);
       /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabs (__real__ x);
+      __real__ result = -1 / M_FABS (__real__ x);
     }
   else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
     {
       /* Neither real nor imaginary part is NaN.  */
-      double absx = fabs (__real__ x), absy = fabs (__imag__ x);
+      FLOAT absx = M_FABS (__real__ x), absy = M_FABS (__imag__ x);
       int scale = 0;
 
       if (absx < absy)
 	{
-	  double t = absx;
+	  FLOAT t = absx;
 	  absx = absy;
 	  absy = t;
 	}
 
-      if (absx > DBL_MAX / 2.0)
+      if (absx > M_MAX / 2)
 	{
 	  scale = -1;
-	  absx = __scalbn (absx, scale);
-	  absy = (absy >= DBL_MIN * 2.0 ? __scalbn (absy, scale) : 0.0);
+	  absx = M_SCALBN (absx, scale);
+	  absy = (absy >= M_MIN * 2 ? M_SCALBN (absy, scale) : 0);
 	}
-      else if (absx < DBL_MIN && absy < DBL_MIN)
+      else if (absx < M_MIN && absy < M_MIN)
 	{
-	  scale = DBL_MANT_DIG;
-	  absx = __scalbn (absx, scale);
-	  absy = __scalbn (absy, scale);
+	  scale = M_MANT_DIG;
+	  absx = M_SCALBN (absx, scale);
+	  absy = M_SCALBN (absy, scale);
 	}
 
-      if (absx == 1.0 && scale == 0)
+      if (absx == 1 && scale == 0)
 	{
-	  __real__ result = __log1p (absy * absy) / 2.0;
+	  __real__ result = M_LOG1P (absy * absy) / 2;
 	  math_check_force_underflow_nonneg (__real__ result);
 	}
-      else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
+      else if (absx > 1 && absx < 2 && absy < 1 && scale == 0)
 	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  if (absy >= DBL_EPSILON)
+	  FLOAT d2m1 = (absx - 1) * (absx + 1);
+	  if (absy >= M_EPSILON)
 	    d2m1 += absy * absy;
-	  __real__ result = __log1p (d2m1) / 2.0;
+	  __real__ result = M_LOG1P (d2m1) / 2;
 	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && absy < DBL_EPSILON / 2.0
+      else if (absx < 1
+	       && absx >= M_LIT (0.5)
+	       && absy < M_EPSILON / 2
 	       && scale == 0)
 	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  __real__ result = __log1p (d2m1) / 2.0;
+	  FLOAT d2m1 = (absx - 1) * (absx + 1);
+	  __real__ result = M_LOG1P (d2m1) / 2;
 	}
-      else if (absx < 1.0
-	       && absx >= 0.5
+      else if (absx < 1
+	       && absx >= M_LIT (0.5)
 	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5)
+	       && absx * absx + absy * absy >= M_LIT (0.5))
 	{
-	  double d2m1 = __x2y2m1 (absx, absy);
-	  __real__ result = __log1p (d2m1) / 2.0;
+	  FLOAT d2m1 = M_FUNC (__x2y2m1) (absx, absy);
+	  __real__ result = M_LOG1P (d2m1) / 2;
 	}
       else
 	{
-	  double d = __ieee754_hypot (absx, absy);
-	  __real__ result = __ieee754_log (d) - scale * M_LN2;
+	  FLOAT d = M_HYPOT (absx, absy);
+	  __real__ result = M_LOG (d) - scale * (FLOAT) M_MLIT (M_LN2);
 	}
 
-      __imag__ result = __ieee754_atan2 (__imag__ x, __real__ x);
+      __imag__ result = M_ATAN2 (__imag__ x, __real__ x);
     }
   else
     {
-      __imag__ result = __nan ("");
+      __imag__ result = M_NAN;
       if (rcls == FP_INFINITE || icls == FP_INFINITE)
 	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VAL;
+	__real__ result = M_HUGE_VAL;
       else
-	__real__ result = __nan ("");
+	__real__ result = M_NAN;
     }
 
   return result;
 }
-weak_alias (__clog, clog)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog, __clogl)
-weak_alias (__clog, clogl)
+
+declare_mgen_alias (__clog, clog)
+
+#if M_LIBM_NEED_COMPAT (clog)
+  declare_mgen_libm_compat (__clog, clog)
 #endif
diff --git a/math/b_clog10.c b/math/b_clog10.c
index 8d9245b..ff38ffe 100644
--- a/math/b_clog10.c
+++ b/math/b_clog10.c
@@ -23,102 +23,121 @@
 #include <float.h>
 
 /* log_10 (2).  */
-#define M_LOG10_2 0.3010299956639811952137388947244930267682
+#define LOG10_2 M_LIT (0.3010299956639811952137388947244930267682)
 
 /* pi * log10 (e).  */
-#define M_PI_LOG10E 1.364376353841841347485783625431355770210
+#define PI_LOG10E M_LIT (1.364376353841841347485783625431355770210)
 
-__complex__ double
-__clog10 (__complex__ double x)
+#if !defined (M_DISABLE_ALIASING) \
+    && defined (LONG_DOUBLE_COMPAT_VERSION) && M_TYPE == M_LDOUBLE
+# undef M_DECL_FUNC
+# define M_DECL_FUNC(x) __clog10l_internal
+#endif
+
+CFLOAT
+M_DECL_FUNC (__clog10) (CFLOAT x)
 {
-  __complex__ double result;
+  CFLOAT result;
   int rcls = fpclassify (__real__ x);
   int icls = fpclassify (__imag__ x);
 
   if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
     {
       /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI_LOG10E : 0.0;
-      __imag__ result = __copysign (__imag__ result, __imag__ x);
+      __imag__ result = signbit (__real__ x) ? PI_LOG10E : 0;
+      __imag__ result = M_COPYSIGN (__imag__ result, __imag__ x);
       /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabs (__real__ x);
+      __real__ result = -1 / M_FABS (__real__ x);
     }
   else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
     {
       /* Neither real nor imaginary part is NaN.  */
-      double absx = fabs (__real__ x), absy = fabs (__imag__ x);
+      FLOAT absx = M_FABS (__real__ x), absy = M_FABS (__imag__ x);
       int scale = 0;
 
       if (absx < absy)
 	{
-	  double t = absx;
+	  FLOAT t = absx;
 	  absx = absy;
 	  absy = t;
 	}
 
-      if (absx > DBL_MAX / 2.0)
+      if (absx > M_MAX / 2)
 	{
 	  scale = -1;
-	  absx = __scalbn (absx, scale);
-	  absy = (absy >= DBL_MIN * 2.0 ? __scalbn (absy, scale) : 0.0);
+	  absx = M_SCALBN (absx, scale);
+	  absy = (absy >= M_MIN * 2 ? M_SCALBN (absy, scale) : 0);
 	}
-      else if (absx < DBL_MIN && absy < DBL_MIN)
+      else if (absx < M_MIN && absy < M_MIN)
 	{
-	  scale = DBL_MANT_DIG;
-	  absx = __scalbn (absx, scale);
-	  absy = __scalbn (absy, scale);
+	  scale = M_MANT_DIG;
+	  absx = M_SCALBN (absx, scale);
+	  absy = M_SCALBN (absy, scale);
 	}
 
-      if (absx == 1.0 && scale == 0)
+      if (absx == 1 && scale == 0)
 	{
-	  __real__ result = __log1p (absy * absy) * (M_LOG10E / 2.0);
+	  __real__ result = M_LOG1P (absy * absy) *
+			      ((FLOAT) M_MLIT (M_LOG10E) / 2);
 	  math_check_force_underflow_nonneg (__real__ result);
 	}
-      else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
+      else if (absx > 1 && absx < 2
+	       && absy < 1 && scale == 0)
 	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  if (absy >= DBL_EPSILON)
+	  FLOAT d2m1 = (absx - 1) * (absx + 1);
+	  if (absy >= M_EPSILON)
 	    d2m1 += absy * absy;
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+	  __real__ result = M_LOG1P (d2m1) * ((FLOAT) M_MLIT (M_LOG10E) / 2);
 	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && absy < DBL_EPSILON / 2.0
+      else if (absx < 1
+	       && absx >= M_LIT (0.5)
+	       && absy < M_EPSILON / 2
 	       && scale == 0)
 	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+	  FLOAT d2m1 = (absx - 1) * (absx + 1);
+	  __real__ result = M_LOG1P (d2m1) * ((FLOAT) M_MLIT (M_LOG10E) / 2);
 	}
-      else if (absx < 1.0
-	       && absx >= 0.5
+      else if (absx < 1
+	       && absx >= M_LIT (0.5)
 	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5)
+	       && absx * absx + absy * absy >= M_LIT (0.5))
 	{
-	  double d2m1 = __x2y2m1 (absx, absy);
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+	  FLOAT d2m1 = M_FUNC (__x2y2m1) (absx, absy);
+	  __real__ result = M_LOG1P (d2m1) * ((FLOAT) M_MLIT (M_LOG10E) / 2);
 	}
       else
 	{
-	  double d = __ieee754_hypot (absx, absy);
-	  __real__ result = __ieee754_log10 (d) - scale * M_LOG10_2;
+	  FLOAT d = M_HYPOT (absx, absy);
+	  __real__ result = M_FUNC (__ieee754_log10) (d) - scale * LOG10_2;
 	}
 
-      __imag__ result = M_LOG10E * __ieee754_atan2 (__imag__ x, __real__ x);
+      __imag__ result = M_MLIT (M_LOG10E) * M_ATAN2 (__imag__ x, __real__ x);
     }
   else
     {
-      __imag__ result = __nan ("");
+      __imag__ result = M_NAN;
       if (rcls == FP_INFINITE || icls == FP_INFINITE)
 	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VAL;
+	__real__ result = M_HUGE_VAL;
       else
-	__real__ result = __nan ("");
+	__real__ result = M_NAN;
     }
 
   return result;
 }
-weak_alias (__clog10, clog10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog10, __clog10l)
-weak_alias (__clog10, clog10l)
+
+/* The aliasing for long double is a bit more complicated
+   since some private symbols leaked out in the past.  */
+#if defined (LONG_DOUBLE_COMPAT_VERSION) && M_TYPE == M_LDOUBLE	\
+    && !defined (M_INHIBIT_ALIASING)
+  strong_alias (__clog10l_internal, __clog10l__internal)
+  long_double_symbol (libm, __clog10l_internal, __clog10l);
+  long_double_symbol (libm, __clog10l__internal, clog10l);
+#else
+  declare_mgen_alias (__clog10, clog10)
+#endif
+
+#if M_LIBM_NEED_COMPAT (clog10)
+  declare_mgen_libm_compat (__clog10, __clog10)
+  declare_mgen_libm_compat (clog10, clog10)
 #endif
diff --git a/math/b_cpow.c b/math/b_cpow.c
index 037e575..c4862aa 100644
--- a/math/b_cpow.c
+++ b/math/b_cpow.c
@@ -1,4 +1,4 @@
-/* Complex power of double values.
+/* Complex power of float type.
    Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,14 +20,14 @@
 #include <complex.h>
 #include <math.h>
 
-
-__complex__ double
-__cpow (__complex__ double x, __complex__ double c)
+CFLOAT
+M_DECL_FUNC (__cpow) (CFLOAT x, CFLOAT c)
 {
-  return __cexp (c * __clog (x));
+  return M_FUNC (__cexp) (c * M_FUNC (__clog) (x));
 }
-weak_alias (__cpow, cpow)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cpow, __cpowl)
-weak_alias (__cpow, cpowl)
+
+declare_mgen_alias (__cpow, cpow)
+
+#if M_LIBM_NEED_COMPAT (cpow)
+  declare_mgen_libm_compat (__cpow, cpow)
 #endif
diff --git a/math/b_cproj.c b/math/b_cproj.c
index d47f009..35b8ba2 100644
--- a/math/b_cproj.c
+++ b/math/b_cproj.c
@@ -1,4 +1,4 @@
-/* Compute projection of complex double value to Riemann sphere.
+/* Compute projection of complex float type value to Riemann sphere.
    Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -22,23 +22,24 @@
 #include <math_private.h>
 
 
-__complex__ double
-__cproj (__complex__ double x)
+CFLOAT
+M_DECL_FUNC (__cproj) (CFLOAT x)
 {
   if (isinf (__real__ x) || isinf (__imag__ x))
     {
-      __complex__ double res;
+      CFLOAT res;
 
       __real__ res = INFINITY;
-      __imag__ res = __copysign (0.0, __imag__ x);
+      __imag__ res = M_COPYSIGN (0, __imag__ x);
 
       return res;
     }
 
   return x;
 }
-weak_alias (__cproj, cproj)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cproj, __cprojl)
-weak_alias (__cproj, cprojl)
+
+declare_mgen_alias (__cproj, cproj)
+
+#if M_LIBM_NEED_COMPAT (cproj)
+  declare_mgen_libm_compat (__cproj, cproj)
 #endif
diff --git a/math/b_csqrt.c b/math/b_csqrt.c
index 1f073e7..07bb901 100644
--- a/math/b_csqrt.c
+++ b/math/b_csqrt.c
@@ -1,4 +1,4 @@
-/* Complex square root of double value.
+/* Complex square root of a float type.
    Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
@@ -23,10 +23,10 @@
 #include <math_private.h>
 #include <float.h>
 
-__complex__ double
-__csqrt (__complex__ double x)
+CFLOAT
+M_DECL_FUNC (__csqrt) (CFLOAT x)
 {
-  __complex__ double res;
+  CFLOAT res;
   int rcls = fpclassify (__real__ x);
   int icls = fpclassify (__imag__ x);
 
@@ -34,132 +34,131 @@ __csqrt (__complex__ double x)
     {
       if (icls == FP_INFINITE)
 	{
-	  __real__ res = HUGE_VAL;
+	  __real__ res = M_HUGE_VAL;
 	  __imag__ res = __imag__ x;
 	}
       else if (rcls == FP_INFINITE)
 	{
-	  if (__real__ x < 0.0)
+	  if (__real__ x < 0)
 	    {
-	      __real__ res = icls == FP_NAN ? __nan ("") : 0;
-	      __imag__ res = __copysign (HUGE_VAL, __imag__ x);
+	      __real__ res = icls == FP_NAN ? M_NAN : 0;
+	      __imag__ res = M_COPYSIGN (M_HUGE_VAL, __imag__ x);
 	    }
 	  else
 	    {
 	      __real__ res = __real__ x;
 	      __imag__ res = (icls == FP_NAN
-			      ? __nan ("") : __copysign (0.0, __imag__ x));
+			      ? M_NAN : M_COPYSIGN (0, __imag__ x));
 	    }
 	}
       else
 	{
-	  __real__ res = __nan ("");
-	  __imag__ res = __nan ("");
+	  __real__ res = M_NAN;
+	  __imag__ res = M_NAN;
 	}
     }
   else
     {
       if (__glibc_unlikely (icls == FP_ZERO))
 	{
-	  if (__real__ x < 0.0)
+	  if (__real__ x < 0)
 	    {
-	      __real__ res = 0.0;
-	      __imag__ res = __copysign (__ieee754_sqrt (-__real__ x),
-					 __imag__ x);
+	      __real__ res = 0;
+	      __imag__ res = M_COPYSIGN (M_SQRT (-__real__ x), __imag__ x);
 	    }
 	  else
 	    {
-	      __real__ res = fabs (__ieee754_sqrt (__real__ x));
-	      __imag__ res = __copysign (0.0, __imag__ x);
+	      __real__ res = M_FABS (M_SQRT (__real__ x));
+	      __imag__ res = M_COPYSIGN (0, __imag__ x);
 	    }
 	}
       else if (__glibc_unlikely (rcls == FP_ZERO))
 	{
-	  double r;
-	  if (fabs (__imag__ x) >= 2.0 * DBL_MIN)
-	    r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
+	  FLOAT r;
+	  if (M_FABS (__imag__ x) >= 2 * M_MIN)
+	    r = M_SQRT (M_LIT (0.5) * M_FABS (__imag__ x));
 	  else
-	    r = 0.5 * __ieee754_sqrt (2.0 * fabs (__imag__ x));
+	    r = M_LIT (0.5) * M_SQRT (2 * M_FABS (__imag__ x));
 
 	  __real__ res = r;
-	  __imag__ res = __copysign (r, __imag__ x);
+	  __imag__ res = M_COPYSIGN (r, __imag__ x);
 	}
       else
 	{
-	  double d, r, s;
+	  FLOAT d, r, s;
 	  int scale = 0;
 
-	  if (fabs (__real__ x) > DBL_MAX / 4.0)
+	  if (M_FABS (__real__ x) > M_MAX / 4)
 	    {
 	      scale = 1;
-	      __real__ x = __scalbn (__real__ x, -2 * scale);
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
+	      __real__ x = M_SCALBN (__real__ x, -2 * scale);
+	      __imag__ x = M_SCALBN (__imag__ x, -2 * scale);
 	    }
-	  else if (fabs (__imag__ x) > DBL_MAX / 4.0)
+	  else if (M_FABS (__imag__ x) > M_MAX / 4)
 	    {
 	      scale = 1;
-	      if (fabs (__real__ x) >= 4.0 * DBL_MIN)
-		__real__ x = __scalbn (__real__ x, -2 * scale);
+	      if (M_FABS (__real__ x) >= 4 * M_MIN)
+		__real__ x = M_SCALBN (__real__ x, -2 * scale);
 	      else
-		__real__ x = 0.0;
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
+		__real__ x = 0;
+	      __imag__ x = M_SCALBN (__imag__ x, -2 * scale);
 	    }
-	  else if (fabs (__real__ x) < 2.0 * DBL_MIN
-		   && fabs (__imag__ x) < 2.0 * DBL_MIN)
+	  else if (M_FABS (__real__ x) < 2 * M_MIN
+		   && M_FABS (__imag__ x) < 2 * M_MIN)
 	    {
-	      scale = -((DBL_MANT_DIG + 1) / 2);
-	      __real__ x = __scalbn (__real__ x, -2 * scale);
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
+	      scale = -((M_MANT_DIG + 1) / 2);
+	      __real__ x = M_SCALBN (__real__ x, -2 * scale);
+	      __imag__ x = M_SCALBN (__imag__ x, -2 * scale);
 	    }
 
-	  d = __ieee754_hypot (__real__ x, __imag__ x);
+	  d = M_HYPOT (__real__ x, __imag__ x);
 	  /* Use the identity   2  Re res  Im res = Im x
 	     to avoid cancellation error in  d +/- Re x.  */
 	  if (__real__ x > 0)
 	    {
-	      r = __ieee754_sqrt (0.5 * (d + __real__ x));
-	      if (scale == 1 && fabs (__imag__ x) < 1.0)
+	      r = M_SQRT (M_LIT (0.5) * (d + __real__ x));
+	      if (scale == 1 && M_FABS (__imag__ x) < 1)
 		{
 		  /* Avoid possible intermediate underflow.  */
 		  s = __imag__ x / r;
-		  r = __scalbn (r, scale);
+		  r = M_SCALBN (r, scale);
 		  scale = 0;
 		}
 	      else
-		s = 0.5 * (__imag__ x / r);
+		s = M_LIT (0.5) * (__imag__ x / r);
 	    }
 	  else
 	    {
-	      s = __ieee754_sqrt (0.5 * (d - __real__ x));
-	      if (scale == 1 && fabs (__imag__ x) < 1.0)
+	      s = M_SQRT (M_LIT (0.5) * (d - __real__ x));
+	      if (scale == 1 && M_FABS (__imag__ x) < 1)
 		{
 		  /* Avoid possible intermediate underflow.  */
-		  r = fabs (__imag__ x / s);
-		  s = __scalbn (s, scale);
+		  r = M_FABS (__imag__ x / s);
+		  s = M_SCALBN (s, scale);
 		  scale = 0;
 		}
 	      else
-		r = fabs (0.5 * (__imag__ x / s));
+		r = M_FABS (M_LIT (0.5) * (__imag__ x / s));
 	    }
 
 	  if (scale)
 	    {
-	      r = __scalbn (r, scale);
-	      s = __scalbn (s, scale);
+	      r = M_SCALBN (r, scale);
+	      s = M_SCALBN (s, scale);
 	    }
 
 	  math_check_force_underflow (r);
 	  math_check_force_underflow (s);
 
 	  __real__ res = r;
-	  __imag__ res = __copysign (s, __imag__ x);
+	  __imag__ res = M_COPYSIGN (s, __imag__ x);
 	}
     }
 
   return res;
 }
-weak_alias (__csqrt, csqrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csqrt, __csqrtl)
-weak_alias (__csqrt, csqrtl)
+declare_mgen_alias (__csqrt, csqrt)
+
+#if M_LIBM_NEED_COMPAT (csqrt)
+  declare_mgen_libm_compat (__csqrt, csqrt)
 #endif
diff --git a/math/s_cexp.c b/math/s_cexp.c
deleted file mode 100644
index 3a476bd..0000000
--- a/math/s_cexp.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Return value of complex exponential function for double complex value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ double
-__cexp (__complex__ double x)
-{
-  __complex__ double retval;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_likely (rcls >= FP_ZERO))
-    {
-      /* Real part is finite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
-	  double sinix, cosix;
-
-	  if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
-	    {
-	      __sincos (__imag__ x, &sinix, &cosix);
-	    }
-	  else
-	    {
-	      sinix = __imag__ x;
-	      cosix = 1.0;
-	    }
-
-	  if (__real__ x > t)
-	    {
-	      double exp_t = __ieee754_exp (t);
-	      __real__ x -= t;
-	      sinix *= exp_t;
-	      cosix *= exp_t;
-	      if (__real__ x > t)
-		{
-		  __real__ x -= t;
-		  sinix *= exp_t;
-		  cosix *= exp_t;
-		}
-	    }
-	  if (__real__ x > t)
-	    {
-	      /* Overflow (original real part of x > 3t).  */
-	      __real__ retval = DBL_MAX * cosix;
-	      __imag__ retval = DBL_MAX * sinix;
-	    }
-	  else
-	    {
-	      double exp_val = __ieee754_exp (__real__ x);
-	      __real__ retval = exp_val * cosix;
-	      __imag__ retval = exp_val * sinix;
-	    }
-	  math_check_force_underflow_complex (retval);
-	}
-      else
-	{
-	  /* If the imaginary part is +-inf or NaN and the real part
-	     is not +-inf the result is NaN + iNaN.  */
-	  __real__ retval = __nan ("");
-	  __imag__ retval = __nan ("");
-
-	  feraiseexcept (FE_INVALID);
-	}
-    }
-  else if (__glibc_likely (rcls == FP_INFINITE))
-    {
-      /* Real part is infinite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
-
-	  if (icls == FP_ZERO)
-	    {
-	      /* Imaginary part is 0.0.  */
-	      __real__ retval = value;
-	      __imag__ retval = __imag__ x;
-	    }
-	  else
-	    {
-	      double sinix, cosix;
-
-	      if (__glibc_likely (fabs (__imag__ x) > DBL_MIN))
-		{
-		  __sincos (__imag__ x, &sinix, &cosix);
-		}
-	      else
-		{
-		  sinix = __imag__ x;
-		  cosix = 1.0;
-		}
-
-	      __real__ retval = __copysign (value, cosix);
-	      __imag__ retval = __copysign (value, sinix);
-	    }
-	}
-      else if (signbit (__real__ x) == 0)
-	{
-	  __real__ retval = HUGE_VAL;
-	  __imag__ retval = __nan ("");
-
-	  if (icls == FP_INFINITE)
-	    feraiseexcept (FE_INVALID);
-	}
-      else
-	{
-	  __real__ retval = 0.0;
-	  __imag__ retval = __copysign (0.0, __imag__ x);
-	}
-    }
-  else
-    {
-      /* If the real part is NaN the result is NaN + iNaN unless the
-	 imaginary part is zero.  */
-      __real__ retval = __nan ("");
-      if (icls == FP_ZERO)
-	__imag__ retval = __imag__ x;
-      else
-	{
-	  __imag__ retval = __nan ("");
-
-	  if (rcls != FP_NAN || icls != FP_NAN)
-	    feraiseexcept (FE_INVALID);
-	}
-    }
-
-  return retval;
-}
-weak_alias (__cexp, cexp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cexp, __cexpl)
-weak_alias (__cexp, cexpl)
-#endif
diff --git a/math/s_cexpf.c b/math/s_cexpf.c
deleted file mode 100644
index 001fec2..0000000
--- a/math/s_cexpf.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Return value of complex exponential function for float complex value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ float
-__cexpf (__complex__ float x)
-{
-  __complex__ float retval;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_likely (rcls >= FP_ZERO))
-    {
-      /* Real part is finite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
-	  float sinix, cosix;
-
-	  if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
-	    {
-	      __sincosf (__imag__ x, &sinix, &cosix);
-	    }
-	  else
-	    {
-	      sinix = __imag__ x;
-	      cosix = 1.0f;
-	    }
-
-	  if (__real__ x > t)
-	    {
-	      float exp_t = __ieee754_expf (t);
-	      __real__ x -= t;
-	      sinix *= exp_t;
-	      cosix *= exp_t;
-	      if (__real__ x > t)
-		{
-		  __real__ x -= t;
-		  sinix *= exp_t;
-		  cosix *= exp_t;
-		}
-	    }
-	  if (__real__ x > t)
-	    {
-	      /* Overflow (original real part of x > 3t).  */
-	      __real__ retval = FLT_MAX * cosix;
-	      __imag__ retval = FLT_MAX * sinix;
-	    }
-	  else
-	    {
-	      float exp_val = __ieee754_expf (__real__ x);
-	      __real__ retval = exp_val * cosix;
-	      __imag__ retval = exp_val * sinix;
-	    }
-	  math_check_force_underflow_complex (retval);
-	}
-      else
-	{
-	  /* If the imaginary part is +-inf or NaN and the real part
-	     is not +-inf the result is NaN + iNaN.  */
-	  __real__ retval = __nanf ("");
-	  __imag__ retval = __nanf ("");
-
-	  feraiseexcept (FE_INVALID);
-	}
-    }
-  else if (__glibc_likely (rcls == FP_INFINITE))
-    {
-      /* Real part is infinite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
-
-	  if (icls == FP_ZERO)
-	    {
-	      /* Imaginary part is 0.0.  */
-	      __real__ retval = value;
-	      __imag__ retval = __imag__ x;
-	    }
-	  else
-	    {
-	      float sinix, cosix;
-
-	      if (__glibc_likely (fabsf (__imag__ x) > FLT_MIN))
-		{
-		  __sincosf (__imag__ x, &sinix, &cosix);
-		}
-	      else
-		{
-		  sinix = __imag__ x;
-		  cosix = 1.0f;
-		}
-
-	      __real__ retval = __copysignf (value, cosix);
-	      __imag__ retval = __copysignf (value, sinix);
-	    }
-	}
-      else if (signbit (__real__ x) == 0)
-	{
-	  __real__ retval = HUGE_VALF;
-	  __imag__ retval = __nanf ("");
-
-	  if (icls == FP_INFINITE)
-	    feraiseexcept (FE_INVALID);
-	}
-      else
-	{
-	  __real__ retval = 0.0;
-	  __imag__ retval = __copysignf (0.0, __imag__ x);
-	}
-    }
-  else
-    {
-      /* If the real part is NaN the result is NaN + iNaN unless the
-	 imaginary part is zero.  */
-      __real__ retval = __nanf ("");
-      if (icls == FP_ZERO)
-	__imag__ retval = __imag__ x;
-      else
-	{
-	  __imag__ retval = __nanf ("");
-
-	  if (rcls != FP_NAN || icls != FP_NAN)
-	    feraiseexcept (FE_INVALID);
-	}
-    }
-
-  return retval;
-}
-#ifndef __cexpf
-weak_alias (__cexpf, cexpf)
-#endif
diff --git a/math/s_cexpl.c b/math/s_cexpl.c
deleted file mode 100644
index 9ab566c..0000000
--- a/math/s_cexpl.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Return value of complex exponential function for long double complex value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ long double
-__cexpl (__complex__ long double x)
-{
-  __complex__ long double retval;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_likely (rcls >= FP_ZERO))
-    {
-      /* Real part is finite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
-	  long double sinix, cosix;
-
-	  if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
-	    {
-	      __sincosl (__imag__ x, &sinix, &cosix);
-	    }
-	  else
-	    {
-	      sinix = __imag__ x;
-	      cosix = 1.0;
-	    }
-
-	  if (__real__ x > t)
-	    {
-	      long double exp_t = __ieee754_expl (t);
-	      __real__ x -= t;
-	      sinix *= exp_t;
-	      cosix *= exp_t;
-	      if (__real__ x > t)
-		{
-		  __real__ x -= t;
-		  sinix *= exp_t;
-		  cosix *= exp_t;
-		}
-	    }
-	  if (__real__ x > t)
-	    {
-	      /* Overflow (original real part of x > 3t).  */
-	      __real__ retval = LDBL_MAX * cosix;
-	      __imag__ retval = LDBL_MAX * sinix;
-	    }
-	  else
-	    {
-	      long double exp_val = __ieee754_expl (__real__ x);
-	      __real__ retval = exp_val * cosix;
-	      __imag__ retval = exp_val * sinix;
-	    }
-	  math_check_force_underflow_complex (retval);
-	}
-      else
-	{
-	  /* If the imaginary part is +-inf or NaN and the real part
-	     is not +-inf the result is NaN + iNaN.  */
-	  __real__ retval = __nanl ("");
-	  __imag__ retval = __nanl ("");
-
-	  feraiseexcept (FE_INVALID);
-	}
-    }
-  else if (__glibc_likely (rcls == FP_INFINITE))
-    {
-      /* Real part is infinite.  */
-      if (__glibc_likely (icls >= FP_ZERO))
-	{
-	  /* Imaginary part is finite.  */
-	  long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
-
-	  if (icls == FP_ZERO)
-	    {
-	      /* Imaginary part is 0.0.  */
-	      __real__ retval = value;
-	      __imag__ retval = __imag__ x;
-	    }
-	  else
-	    {
-	      long double sinix, cosix;
-
-	      if (__glibc_likely (fabsl (__imag__ x) > LDBL_MIN))
-	        {
-		  __sincosl (__imag__ x, &sinix, &cosix);
-	        }
-	      else
-		{
-		  sinix = __imag__ x;
-		  cosix = 1.0;
-		}
-
-	      __real__ retval = __copysignl (value, cosix);
-	      __imag__ retval = __copysignl (value, sinix);
-	    }
-	}
-      else if (signbit (__real__ x) == 0)
-	{
-	  __real__ retval = HUGE_VALL;
-	  __imag__ retval = __nanl ("");
-
-	  if (icls == FP_INFINITE)
-	    feraiseexcept (FE_INVALID);
-	}
-      else
-	{
-	  __real__ retval = 0.0;
-	  __imag__ retval = __copysignl (0.0, __imag__ x);
-	}
-    }
-  else
-    {
-      /* If the real part is NaN the result is NaN + iNaN unless the
-	 imaginary part is zero.  */
-      __real__ retval = __nanl ("");
-      if (icls == FP_ZERO)
-	__imag__ retval = __imag__ x;
-      else
-	{
-	  __imag__ retval = __nanl ("");
-
-	  if (rcls != FP_NAN || icls != FP_NAN)
-	    feraiseexcept (FE_INVALID);
-	}
-    }
-
-  return retval;
-}
-weak_alias (__cexpl, cexpl)
diff --git a/math/s_clog.c b/math/s_clog.c
deleted file mode 100644
index b546030..0000000
--- a/math/s_clog.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Compute complex natural logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ double
-__clog (__complex__ double x)
-{
-  __complex__ double result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
-      __imag__ result = __copysign (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabs (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      double absx = fabs (__real__ x), absy = fabs (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  double t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > DBL_MAX / 2.0)
-	{
-	  scale = -1;
-	  absx = __scalbn (absx, scale);
-	  absy = (absy >= DBL_MIN * 2.0 ? __scalbn (absy, scale) : 0.0);
-	}
-      else if (absx < DBL_MIN && absy < DBL_MIN)
-	{
-	  scale = DBL_MANT_DIG;
-	  absx = __scalbn (absx, scale);
-	  absy = __scalbn (absy, scale);
-	}
-
-      if (absx == 1.0 && scale == 0)
-	{
-	  __real__ result = __log1p (absy * absy) / 2.0;
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
-	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  if (absy >= DBL_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1p (d2m1) / 2.0;
-	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && absy < DBL_EPSILON / 2.0
-	       && scale == 0)
-	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  __real__ result = __log1p (d2m1) / 2.0;
-	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5)
-	{
-	  double d2m1 = __x2y2m1 (absx, absy);
-	  __real__ result = __log1p (d2m1) / 2.0;
-	}
-      else
-	{
-	  double d = __ieee754_hypot (absx, absy);
-	  __real__ result = __ieee754_log (d) - scale * M_LN2;
-	}
-
-      __imag__ result = __ieee754_atan2 (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nan ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VAL;
-      else
-	__real__ result = __nan ("");
-    }
-
-  return result;
-}
-weak_alias (__clog, clog)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog, __clogl)
-weak_alias (__clog, clogl)
-#endif
diff --git a/math/s_clog10.c b/math/s_clog10.c
deleted file mode 100644
index 8d9245b..0000000
--- a/math/s_clog10.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Compute complex base 10 logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-/* log_10 (2).  */
-#define M_LOG10_2 0.3010299956639811952137388947244930267682
-
-/* pi * log10 (e).  */
-#define M_PI_LOG10E 1.364376353841841347485783625431355770210
-
-__complex__ double
-__clog10 (__complex__ double x)
-{
-  __complex__ double result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI_LOG10E : 0.0;
-      __imag__ result = __copysign (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabs (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      double absx = fabs (__real__ x), absy = fabs (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  double t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > DBL_MAX / 2.0)
-	{
-	  scale = -1;
-	  absx = __scalbn (absx, scale);
-	  absy = (absy >= DBL_MIN * 2.0 ? __scalbn (absy, scale) : 0.0);
-	}
-      else if (absx < DBL_MIN && absy < DBL_MIN)
-	{
-	  scale = DBL_MANT_DIG;
-	  absx = __scalbn (absx, scale);
-	  absy = __scalbn (absy, scale);
-	}
-
-      if (absx == 1.0 && scale == 0)
-	{
-	  __real__ result = __log1p (absy * absy) * (M_LOG10E / 2.0);
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
-	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  if (absy >= DBL_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
-	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && absy < DBL_EPSILON / 2.0
-	       && scale == 0)
-	{
-	  double d2m1 = (absx - 1.0) * (absx + 1.0);
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
-	}
-      else if (absx < 1.0
-	       && absx >= 0.5
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5)
-	{
-	  double d2m1 = __x2y2m1 (absx, absy);
-	  __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
-	}
-      else
-	{
-	  double d = __ieee754_hypot (absx, absy);
-	  __real__ result = __ieee754_log10 (d) - scale * M_LOG10_2;
-	}
-
-      __imag__ result = M_LOG10E * __ieee754_atan2 (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nan ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VAL;
-      else
-	__real__ result = __nan ("");
-    }
-
-  return result;
-}
-weak_alias (__clog10, clog10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog10, __clog10l)
-weak_alias (__clog10, clog10l)
-#endif
diff --git a/math/s_clog10f.c b/math/s_clog10f.c
deleted file mode 100644
index 485625e..0000000
--- a/math/s_clog10f.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Compute complex base 10 logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-/* log_10 (2).  */
-#define M_LOG10_2f 0.3010299956639811952137388947244930267682f
-
-/* pi * log10 (e).  */
-#define M_PI_LOG10Ef 1.364376353841841347485783625431355770210f
-
-__complex__ float
-__clog10f (__complex__ float x)
-{
-  __complex__ float result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI_LOG10Ef : 0.0;
-      __imag__ result = __copysignf (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabsf (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      float absx = fabsf (__real__ x), absy = fabsf (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  float t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > FLT_MAX / 2.0f)
-	{
-	  scale = -1;
-	  absx = __scalbnf (absx, scale);
-	  absy = (absy >= FLT_MIN * 2.0f ? __scalbnf (absy, scale) : 0.0f);
-	}
-      else if (absx < FLT_MIN && absy < FLT_MIN)
-	{
-	  scale = FLT_MANT_DIG;
-	  absx = __scalbnf (absx, scale);
-	  absy = __scalbnf (absy, scale);
-	}
-
-      if (absx == 1.0f && scale == 0)
-	{
-	  __real__ result = __log1pf (absy * absy) * ((float) M_LOG10E / 2.0f);
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0)
-	{
-	  float d2m1 = (absx - 1.0f) * (absx + 1.0f);
-	  if (absy >= FLT_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
-	}
-      else if (absx < 1.0f
-	       && absx >= 0.5f
-	       && absy < FLT_EPSILON / 2.0f
-	       && scale == 0)
-	{
-	  float d2m1 = (absx - 1.0f) * (absx + 1.0f);
-	  __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
-	}
-      else if (absx < 1.0f
-	       && absx >= 0.5f
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5f)
-	{
-	  float d2m1 = __x2y2m1f (absx, absy);
-	  __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
-	}
-      else
-	{
-	  float d = __ieee754_hypotf (absx, absy);
-	  __real__ result = __ieee754_log10f (d) - scale * M_LOG10_2f;
-	}
-
-      __imag__ result = M_LOG10E * __ieee754_atan2f (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nanf ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VALF;
-      else
-	__real__ result = __nanf ("");
-    }
-
-  return result;
-}
-#ifndef __clog10f
-weak_alias (__clog10f, clog10f)
-#endif
diff --git a/math/s_clog10l.c b/math/s_clog10l.c
deleted file mode 100644
index da40477..0000000
--- a/math/s_clog10l.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Compute complex base 10 logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-/* To avoid spurious underflows, use this definition to treat IBM long
-   double as approximating an IEEE-style format.  */
-#if LDBL_MANT_DIG == 106
-# undef LDBL_EPSILON
-# define LDBL_EPSILON 0x1p-106L
-#endif
-
-/* log_10 (2).  */
-#define M_LOG10_2l 0.3010299956639811952137388947244930267682L
-
-/* pi * log10 (e).  */
-#define M_PI_LOG10El 1.364376353841841347485783625431355770210L
-
-__complex__ long double
-__clog10l (__complex__ long double x)
-{
-  __complex__ long double result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI_LOG10El : 0.0;
-      __imag__ result = __copysignl (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabsl (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      long double absx = fabsl (__real__ x), absy = fabsl (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  long double t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > LDBL_MAX / 2.0L)
-	{
-	  scale = -1;
-	  absx = __scalbnl (absx, scale);
-	  absy = (absy >= LDBL_MIN * 2.0L ? __scalbnl (absy, scale) : 0.0L);
-	}
-      else if (absx < LDBL_MIN && absy < LDBL_MIN)
-	{
-	  scale = LDBL_MANT_DIG;
-	  absx = __scalbnl (absx, scale);
-	  absy = __scalbnl (absy, scale);
-	}
-
-      if (absx == 1.0L && scale == 0)
-	{
-	  __real__ result = __log1pl (absy * absy) * (M_LOG10El / 2.0L);
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0)
-	{
-	  long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
-	  if (absy >= LDBL_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
-	}
-      else if (absx < 1.0L
-	       && absx >= 0.5L
-	       && absy < LDBL_EPSILON / 2.0L
-	       && scale == 0)
-	{
-	  long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
-	  __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
-	}
-      else if (absx < 1.0L
-	       && absx >= 0.5L
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5L)
-	{
-	  long double d2m1 = __x2y2m1l (absx, absy);
-	  __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
-	}
-      else
-	{
-	  long double d = __ieee754_hypotl (absx, absy);
-	  __real__ result = __ieee754_log10l (d) - scale * M_LOG10_2l;
-	}
-
-      __imag__ result = M_LOG10El * __ieee754_atan2l (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nanl ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VALL;
-      else
-	__real__ result = __nanl ("");
-    }
-
-  return result;
-}
-weak_alias (__clog10l, clog10l)
diff --git a/math/s_clogf.c b/math/s_clogf.c
deleted file mode 100644
index cc56539..0000000
--- a/math/s_clogf.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Compute complex natural logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ float
-__clogf (__complex__ float x)
-{
-  __complex__ float result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
-      __imag__ result = __copysignf (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabsf (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      float absx = fabsf (__real__ x), absy = fabsf (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  float t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > FLT_MAX / 2.0f)
-	{
-	  scale = -1;
-	  absx = __scalbnf (absx, scale);
-	  absy = (absy >= FLT_MIN * 2.0f ? __scalbnf (absy, scale) : 0.0f);
-	}
-      else if (absx < FLT_MIN && absy < FLT_MIN)
-	{
-	  scale = FLT_MANT_DIG;
-	  absx = __scalbnf (absx, scale);
-	  absy = __scalbnf (absy, scale);
-	}
-
-      if (absx == 1.0f && scale == 0)
-	{
-	  __real__ result = __log1pf (absy * absy) / 2.0f;
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0)
-	{
-	  float d2m1 = (absx - 1.0f) * (absx + 1.0f);
-	  if (absy >= FLT_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1pf (d2m1) / 2.0f;
-	}
-      else if (absx < 1.0f
-	       && absx >= 0.5f
-	       && absy < FLT_EPSILON / 2.0f
-	       && scale == 0)
-	{
-	  float d2m1 = (absx - 1.0f) * (absx + 1.0f);
-	  __real__ result = __log1pf (d2m1) / 2.0f;
-	}
-      else if (absx < 1.0f
-	       && absx >= 0.5f
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5f)
-	{
-	  float d2m1 = __x2y2m1f (absx, absy);
-	  __real__ result = __log1pf (d2m1) / 2.0f;
-	}
-      else
-	{
-	  float d = __ieee754_hypotf (absx, absy);
-	  __real__ result = __ieee754_logf (d) - scale * (float) M_LN2;
-	}
-
-      __imag__ result = __ieee754_atan2f (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nanf ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VALF;
-      else
-	__real__ result = __nanf ("");
-    }
-
-  return result;
-}
-#ifndef __clogf
-weak_alias (__clogf, clogf)
-#endif
diff --git a/math/s_clogl.c b/math/s_clogl.c
deleted file mode 100644
index 6db59b7..0000000
--- a/math/s_clogl.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Compute complex natural logarithm.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-/* To avoid spurious underflows, use this definition to treat IBM long
-   double as approximating an IEEE-style format.  */
-#if LDBL_MANT_DIG == 106
-# undef LDBL_EPSILON
-# define LDBL_EPSILON 0x1p-106L
-#endif
-
-__complex__ long double
-__clogl (__complex__ long double x)
-{
-  __complex__ long double result;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
-    {
-      /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
-      __imag__ result = __copysignl (__imag__ result, __imag__ x);
-      /* Yes, the following line raises an exception.  */
-      __real__ result = -1.0 / fabsl (__real__ x);
-    }
-  else if (__glibc_likely (rcls != FP_NAN && icls != FP_NAN))
-    {
-      /* Neither real nor imaginary part is NaN.  */
-      long double absx = fabsl (__real__ x), absy = fabsl (__imag__ x);
-      int scale = 0;
-
-      if (absx < absy)
-	{
-	  long double t = absx;
-	  absx = absy;
-	  absy = t;
-	}
-
-      if (absx > LDBL_MAX / 2.0L)
-	{
-	  scale = -1;
-	  absx = __scalbnl (absx, scale);
-	  absy = (absy >= LDBL_MIN * 2.0L ? __scalbnl (absy, scale) : 0.0L);
-	}
-      else if (absx < LDBL_MIN && absy < LDBL_MIN)
-	{
-	  scale = LDBL_MANT_DIG;
-	  absx = __scalbnl (absx, scale);
-	  absy = __scalbnl (absy, scale);
-	}
-
-      if (absx == 1.0L && scale == 0)
-	{
-	  __real__ result = __log1pl (absy * absy) / 2.0L;
-	  math_check_force_underflow_nonneg (__real__ result);
-	}
-      else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0)
-	{
-	  long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
-	  if (absy >= LDBL_EPSILON)
-	    d2m1 += absy * absy;
-	  __real__ result = __log1pl (d2m1) / 2.0L;
-	}
-      else if (absx < 1.0L
-	       && absx >= 0.5L
-	       && absy < LDBL_EPSILON / 2.0L
-	       && scale == 0)
-	{
-	  long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
-	  __real__ result = __log1pl (d2m1) / 2.0L;
-	}
-      else if (absx < 1.0L
-	       && absx >= 0.5L
-	       && scale == 0
-	       && absx * absx + absy * absy >= 0.5L)
-	{
-	  long double d2m1 = __x2y2m1l (absx, absy);
-	  __real__ result = __log1pl (d2m1) / 2.0L;
-	}
-      else
-	{
-	  long double d = __ieee754_hypotl (absx, absy);
-	  __real__ result = __ieee754_logl (d) - scale * M_LN2l;
-	}
-
-      __imag__ result = __ieee754_atan2l (__imag__ x, __real__ x);
-    }
-  else
-    {
-      __imag__ result = __nanl ("");
-      if (rcls == FP_INFINITE || icls == FP_INFINITE)
-	/* Real or imaginary part is infinite.  */
-	__real__ result = HUGE_VALL;
-      else
-	__real__ result = __nanl ("");
-    }
-
-  return result;
-}
-weak_alias (__clogl, clogl)
diff --git a/math/s_cpow.c b/math/s_cpow.c
deleted file mode 100644
index 037e575..0000000
--- a/math/s_cpow.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Complex power of double values.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ double
-__cpow (__complex__ double x, __complex__ double c)
-{
-  return __cexp (c * __clog (x));
-}
-weak_alias (__cpow, cpow)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cpow, __cpowl)
-weak_alias (__cpow, cpowl)
-#endif
diff --git a/math/s_cpowf.c b/math/s_cpowf.c
deleted file mode 100644
index 2b0b5b2..0000000
--- a/math/s_cpowf.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Complex power of float values.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ float
-__cpowf (__complex__ float x, __complex__ float c)
-{
-  return __cexpf (c * __clogf (x));
-}
-#ifndef __cpowf
-weak_alias (__cpowf, cpowf)
-#endif
diff --git a/math/s_cpowl.c b/math/s_cpowl.c
deleted file mode 100644
index 963e03a..0000000
--- a/math/s_cpowl.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Complex power of long double values.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ long double
-__cpowl (__complex__ long double x, __complex__ long double c)
-{
-  return __cexpl (c * __clogl (x));
-}
-weak_alias (__cpowl, cpowl)
diff --git a/math/s_cproj.c b/math/s_cproj.c
deleted file mode 100644
index d47f009..0000000
--- a/math/s_cproj.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Compute projection of complex double value to Riemann sphere.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-
-
-__complex__ double
-__cproj (__complex__ double x)
-{
-  if (isinf (__real__ x) || isinf (__imag__ x))
-    {
-      __complex__ double res;
-
-      __real__ res = INFINITY;
-      __imag__ res = __copysign (0.0, __imag__ x);
-
-      return res;
-    }
-
-  return x;
-}
-weak_alias (__cproj, cproj)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cproj, __cprojl)
-weak_alias (__cproj, cprojl)
-#endif
diff --git a/math/s_cprojf.c b/math/s_cprojf.c
deleted file mode 100644
index 8a0d873..0000000
--- a/math/s_cprojf.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Compute projection of complex float value to Riemann sphere.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-
-
-__complex__ float
-__cprojf (__complex__ float x)
-{
-  if (isinf (__real__ x) || isinf (__imag__ x))
-    {
-      __complex__ float res;
-
-      __real__ res = INFINITY;
-      __imag__ res = __copysignf (0.0, __imag__ x);
-
-      return res;
-    }
-
-  return x;
-}
-#ifndef __cprojf
-weak_alias (__cprojf, cprojf)
-#endif
diff --git a/math/s_cprojl.c b/math/s_cprojl.c
deleted file mode 100644
index 213b733..0000000
--- a/math/s_cprojl.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Compute projection of complex long double value to Riemann sphere.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-
-
-__complex__ long double
-__cprojl (__complex__ long double x)
-{
-  if (isinf (__real__ x) || isinf (__imag__ x))
-    {
-      __complex__ long double res;
-
-      __real__ res = INFINITY;
-      __imag__ res = __copysignl (0.0, __imag__ x);
-
-      return res;
-    }
-
-  return x;
-}
-weak_alias (__cprojl, cprojl)
diff --git a/math/s_csqrt.c b/math/s_csqrt.c
deleted file mode 100644
index 1f073e7..0000000
--- a/math/s_csqrt.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Complex square root of double value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ double
-__csqrt (__complex__ double x)
-{
-  __complex__ double res;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls <= FP_INFINITE || icls <= FP_INFINITE))
-    {
-      if (icls == FP_INFINITE)
-	{
-	  __real__ res = HUGE_VAL;
-	  __imag__ res = __imag__ x;
-	}
-      else if (rcls == FP_INFINITE)
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = icls == FP_NAN ? __nan ("") : 0;
-	      __imag__ res = __copysign (HUGE_VAL, __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = __real__ x;
-	      __imag__ res = (icls == FP_NAN
-			      ? __nan ("") : __copysign (0.0, __imag__ x));
-	    }
-	}
-      else
-	{
-	  __real__ res = __nan ("");
-	  __imag__ res = __nan ("");
-	}
-    }
-  else
-    {
-      if (__glibc_unlikely (icls == FP_ZERO))
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = 0.0;
-	      __imag__ res = __copysign (__ieee754_sqrt (-__real__ x),
-					 __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = fabs (__ieee754_sqrt (__real__ x));
-	      __imag__ res = __copysign (0.0, __imag__ x);
-	    }
-	}
-      else if (__glibc_unlikely (rcls == FP_ZERO))
-	{
-	  double r;
-	  if (fabs (__imag__ x) >= 2.0 * DBL_MIN)
-	    r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
-	  else
-	    r = 0.5 * __ieee754_sqrt (2.0 * fabs (__imag__ x));
-
-	  __real__ res = r;
-	  __imag__ res = __copysign (r, __imag__ x);
-	}
-      else
-	{
-	  double d, r, s;
-	  int scale = 0;
-
-	  if (fabs (__real__ x) > DBL_MAX / 4.0)
-	    {
-	      scale = 1;
-	      __real__ x = __scalbn (__real__ x, -2 * scale);
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
-	    }
-	  else if (fabs (__imag__ x) > DBL_MAX / 4.0)
-	    {
-	      scale = 1;
-	      if (fabs (__real__ x) >= 4.0 * DBL_MIN)
-		__real__ x = __scalbn (__real__ x, -2 * scale);
-	      else
-		__real__ x = 0.0;
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
-	    }
-	  else if (fabs (__real__ x) < 2.0 * DBL_MIN
-		   && fabs (__imag__ x) < 2.0 * DBL_MIN)
-	    {
-	      scale = -((DBL_MANT_DIG + 1) / 2);
-	      __real__ x = __scalbn (__real__ x, -2 * scale);
-	      __imag__ x = __scalbn (__imag__ x, -2 * scale);
-	    }
-
-	  d = __ieee754_hypot (__real__ x, __imag__ x);
-	  /* Use the identity   2  Re res  Im res = Im x
-	     to avoid cancellation error in  d +/- Re x.  */
-	  if (__real__ x > 0)
-	    {
-	      r = __ieee754_sqrt (0.5 * (d + __real__ x));
-	      if (scale == 1 && fabs (__imag__ x) < 1.0)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  s = __imag__ x / r;
-		  r = __scalbn (r, scale);
-		  scale = 0;
-		}
-	      else
-		s = 0.5 * (__imag__ x / r);
-	    }
-	  else
-	    {
-	      s = __ieee754_sqrt (0.5 * (d - __real__ x));
-	      if (scale == 1 && fabs (__imag__ x) < 1.0)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  r = fabs (__imag__ x / s);
-		  s = __scalbn (s, scale);
-		  scale = 0;
-		}
-	      else
-		r = fabs (0.5 * (__imag__ x / s));
-	    }
-
-	  if (scale)
-	    {
-	      r = __scalbn (r, scale);
-	      s = __scalbn (s, scale);
-	    }
-
-	  math_check_force_underflow (r);
-	  math_check_force_underflow (s);
-
-	  __real__ res = r;
-	  __imag__ res = __copysign (s, __imag__ x);
-	}
-    }
-
-  return res;
-}
-weak_alias (__csqrt, csqrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csqrt, __csqrtl)
-weak_alias (__csqrt, csqrtl)
-#endif
diff --git a/math/s_csqrtf.c b/math/s_csqrtf.c
deleted file mode 100644
index b30af06..0000000
--- a/math/s_csqrtf.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Complex square root of float value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ float
-__csqrtf (__complex__ float x)
-{
-  __complex__ float res;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls <= FP_INFINITE || icls <= FP_INFINITE))
-    {
-      if (icls == FP_INFINITE)
-	{
-	  __real__ res = HUGE_VALF;
-	  __imag__ res = __imag__ x;
-	}
-      else if (rcls == FP_INFINITE)
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = icls == FP_NAN ? __nanf ("") : 0;
-	      __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = __real__ x;
-	      __imag__ res = (icls == FP_NAN
-			      ? __nanf ("") : __copysignf (0.0, __imag__ x));
-	    }
-	}
-      else
-	{
-	  __real__ res = __nanf ("");
-	  __imag__ res = __nanf ("");
-	}
-    }
-  else
-    {
-      if (__glibc_unlikely (icls == FP_ZERO))
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = 0.0;
-	      __imag__ res = __copysignf (__ieee754_sqrtf (-__real__ x),
-					  __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = fabsf (__ieee754_sqrtf (__real__ x));
-	      __imag__ res = __copysignf (0.0, __imag__ x);
-	    }
-	}
-      else if (__glibc_unlikely (rcls == FP_ZERO))
-	{
-	  float r;
-	  if (fabsf (__imag__ x) >= 2.0f * FLT_MIN)
-	    r = __ieee754_sqrtf (0.5f * fabsf (__imag__ x));
-	  else
-	    r = 0.5f * __ieee754_sqrtf (2.0f * fabsf (__imag__ x));
-
-	  __real__ res = r;
-	  __imag__ res = __copysignf (r, __imag__ x);
-	}
-      else
-	{
-	  float d, r, s;
-	  int scale = 0;
-
-	  if (fabsf (__real__ x) > FLT_MAX / 4.0f)
-	    {
-	      scale = 1;
-	      __real__ x = __scalbnf (__real__ x, -2 * scale);
-	      __imag__ x = __scalbnf (__imag__ x, -2 * scale);
-	    }
-	  else if (fabsf (__imag__ x) > FLT_MAX / 4.0f)
-	    {
-	      scale = 1;
-	      if (fabsf (__real__ x) >= 4.0f * FLT_MIN)
-		__real__ x = __scalbnf (__real__ x, -2 * scale);
-	      else
-		__real__ x = 0.0f;
-	      __imag__ x = __scalbnf (__imag__ x, -2 * scale);
-	    }
-	  else if (fabsf (__real__ x) < 2.0f * FLT_MIN
-		   && fabsf (__imag__ x) < 2.0f * FLT_MIN)
-	    {
-	      scale = -((FLT_MANT_DIG + 1) / 2);
-	      __real__ x = __scalbnf (__real__ x, -2 * scale);
-	      __imag__ x = __scalbnf (__imag__ x, -2 * scale);
-	    }
-
-	  d = __ieee754_hypotf (__real__ x, __imag__ x);
-	  /* Use the identity   2  Re res  Im res = Im x
-	     to avoid cancellation error in  d +/- Re x.  */
-	  if (__real__ x > 0)
-	    {
-	      r = __ieee754_sqrtf (0.5f * (d + __real__ x));
-	      if (scale == 1 && fabsf (__imag__ x) < 1.0f)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  s = __imag__ x / r;
-		  r = __scalbnf (r, scale);
-		  scale = 0;
-		}
-	      else
-		s = 0.5f * (__imag__ x / r);
-	    }
-	  else
-	    {
-	      s = __ieee754_sqrtf (0.5f * (d - __real__ x));
-	      if (scale == 1 && fabsf (__imag__ x) < 1.0f)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  r = fabsf (__imag__ x / s);
-		  s = __scalbnf (s, scale);
-		  scale = 0;
-		}
-	      else
-		r = fabsf (0.5f * (__imag__ x / s));
-	    }
-
-	  if (scale)
-	    {
-	      r = __scalbnf (r, scale);
-	      s = __scalbnf (s, scale);
-	    }
-
-	  math_check_force_underflow (r);
-	  math_check_force_underflow (s);
-
-	  __real__ res = r;
-	  __imag__ res = __copysignf (s, __imag__ x);
-	}
-    }
-
-  return res;
-}
-#ifndef __csqrtf
-weak_alias (__csqrtf, csqrtf)
-#endif
diff --git a/math/s_csqrtl.c b/math/s_csqrtl.c
deleted file mode 100644
index b0b52a5..0000000
--- a/math/s_csqrtl.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Complex square root of long double value.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <complex.h>
-#include <math.h>
-#include <math_private.h>
-#include <float.h>
-
-__complex__ long double
-__csqrtl (__complex__ long double x)
-{
-  __complex__ long double res;
-  int rcls = fpclassify (__real__ x);
-  int icls = fpclassify (__imag__ x);
-
-  if (__glibc_unlikely (rcls <= FP_INFINITE || icls <= FP_INFINITE))
-    {
-      if (icls == FP_INFINITE)
-	{
-	  __real__ res = HUGE_VALL;
-	  __imag__ res = __imag__ x;
-	}
-      else if (rcls == FP_INFINITE)
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = icls == FP_NAN ? __nanl ("") : 0;
-	      __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = __real__ x;
-	      __imag__ res = (icls == FP_NAN
-			      ? __nanl ("") : __copysignl (0.0, __imag__ x));
-	    }
-	}
-      else
-	{
-	  __real__ res = __nanl ("");
-	  __imag__ res = __nanl ("");
-	}
-    }
-  else
-    {
-      if (__glibc_unlikely (icls == FP_ZERO))
-	{
-	  if (__real__ x < 0.0)
-	    {
-	      __real__ res = 0.0;
-	      __imag__ res = __copysignl (__ieee754_sqrtl (-__real__ x),
-					  __imag__ x);
-	    }
-	  else
-	    {
-	      __real__ res = fabsl (__ieee754_sqrtl (__real__ x));
-	      __imag__ res = __copysignl (0.0, __imag__ x);
-	    }
-	}
-      else if (__glibc_unlikely (rcls == FP_ZERO))
-	{
-	  long double r;
-	  if (fabsl (__imag__ x) >= 2.0L * LDBL_MIN)
-	    r = __ieee754_sqrtl (0.5L * fabsl (__imag__ x));
-	  else
-	    r = 0.5L * __ieee754_sqrtl (2.0L * fabsl (__imag__ x));
-
-	  __real__ res = r;
-	  __imag__ res = __copysignl (r, __imag__ x);
-	}
-      else
-	{
-	  long double d, r, s;
-	  int scale = 0;
-
-	  if (fabsl (__real__ x) > LDBL_MAX / 4.0L)
-	    {
-	      scale = 1;
-	      __real__ x = __scalbnl (__real__ x, -2 * scale);
-	      __imag__ x = __scalbnl (__imag__ x, -2 * scale);
-	    }
-	  else if (fabsl (__imag__ x) > LDBL_MAX / 4.0L)
-	    {
-	      scale = 1;
-	      if (fabsl (__real__ x) >= 4.0L * LDBL_MIN)
-		__real__ x = __scalbnl (__real__ x, -2 * scale);
-	      else
-		__real__ x = 0.0L;
-	      __imag__ x = __scalbnl (__imag__ x, -2 * scale);
-	    }
-	  else if (fabsl (__real__ x) < 2.0L * LDBL_MIN
-		   && fabsl (__imag__ x) < 2.0L * LDBL_MIN)
-	    {
-	      scale = -((LDBL_MANT_DIG + 1) / 2);
-	      __real__ x = __scalbnl (__real__ x, -2 * scale);
-	      __imag__ x = __scalbnl (__imag__ x, -2 * scale);
-	    }
-
-	  d = __ieee754_hypotl (__real__ x, __imag__ x);
-	  /* Use the identity   2  Re res  Im res = Im x
-	     to avoid cancellation error in  d +/- Re x.  */
-	  if (__real__ x > 0)
-	    {
-	      r = __ieee754_sqrtl (0.5L * (d + __real__ x));
-	      if (scale == 1 && fabsl (__imag__ x) < 1.0L)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  s = __imag__ x / r;
-		  r = __scalbnl (r, scale);
-		  scale = 0;
-		}
-	      else
-		s = 0.5L * (__imag__ x / r);
-	    }
-	  else
-	    {
-	      s = __ieee754_sqrtl (0.5L * (d - __real__ x));
-	      if (scale == 1 && fabsl (__imag__ x) < 1.0L)
-		{
-		  /* Avoid possible intermediate underflow.  */
-		  r = fabsl (__imag__ x / s);
-		  s = __scalbnl (s, scale);
-		  scale = 0;
-		}
-	      else
-		r = fabsl (0.5L * (__imag__ x / s));
-	    }
-
-	  if (scale)
-	    {
-	      r = __scalbnl (r, scale);
-	      s = __scalbnl (s, scale);
-	    }
-
-	  math_check_force_underflow (r);
-	  math_check_force_underflow (s);
-
-	  __real__ res = r;
-	  __imag__ res = __copysignl (s, __imag__ x);
-	}
-    }
-
-  return res;
-}
-weak_alias (__csqrtl, csqrtl)
diff --git a/sysdeps/alpha/fpu/Makefile b/sysdeps/alpha/fpu/Makefile
index d8ccf86..7c7a1ec 100644
--- a/sysdeps/alpha/fpu/Makefile
+++ b/sysdeps/alpha/fpu/Makefile
@@ -2,7 +2,9 @@
 # the respectic s_*.c versions here.
 libm-gen-calls-override = g_cabs_f g_carg_f g_cimag_f g_creal_f g_conj_f \
 	g_cacos_f g_cacosh_f g_ccos_f g_ccosh_f g_casin_f g_csin_f	 \
-	g_casinh_f g_csinh_f g_catan_f g_catanh_f g_ctan_f g_ctanh_f
+	g_casinh_f g_csinh_f g_catan_f g_catanh_f g_ctan_f g_ctanh_f	 \
+	g_cexp_f g_clog_f g_cproj_f g_csqrt_f g_cpow_f g_clog10_f
 libm-gen-replacement-calls = cabsf cargf cimagf crealf conjf	\
 	s_cacosf s_cacoshf s_ccosf s_ccoshf s_casinf s_csinf	\
-	s_casinhf s_csinhf s_catanf s_catanhf s_ctanf s_ctanhf
+	s_casinhf s_csinhf s_catanf s_catanhf s_ctanf s_ctanhf	\
+	s_cexpf s_clogf s_cprojf s_csqrtf s_cpowf s_clog10f
diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c
index 2ae519c..f2e2474 100644
--- a/sysdeps/alpha/fpu/s_cexpf.c
+++ b/sysdeps/alpha/fpu/s_cexpf.c
@@ -24,14 +24,19 @@
 
 #undef __cexpf
 #undef cexpf
-#define __cexpf internal_cexpf
 
 static _Complex float internal_cexpf (_Complex float x);
 
-#include <math/s_cexpf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_cexpf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
 
-#undef __cexpf
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_cexp.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_cexpf (c1_cfloat_decl (x))
diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c
index 1ab0730..3fa06ee 100644
--- a/sysdeps/alpha/fpu/s_clog10f.c
+++ b/sysdeps/alpha/fpu/s_clog10f.c
@@ -24,14 +24,21 @@
 
 #undef __clog10f
 #undef clog10f
-#define __clog10f internal_clog10f
 
 static _Complex float internal_clog10f (_Complex float x);
 
-#include <math/s_clog10f.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_clog10f
+#define M_TYPE M_FLOAT
+/* Disable any non-standard aliasing.  */
+#define M_INHIBIT_ALIASING 1
+#include <math-type-macros.h>
 
-#undef __clog10f
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_clog10.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_clog10f (c1_cfloat_decl (x))
diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c
index 185948f..168d3ef 100644
--- a/sysdeps/alpha/fpu/s_clogf.c
+++ b/sysdeps/alpha/fpu/s_clogf.c
@@ -24,14 +24,19 @@
 
 #undef __clogf
 #undef clogf
-#define __clogf internal_clogf
 
 static _Complex float internal_clogf (_Complex float x);
 
-#include <math/s_clogf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_clogf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
 
-#undef __clogf
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_clog.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_clogf (c1_cfloat_decl (x))
diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c
index 686c397..d16589a 100644
--- a/sysdeps/alpha/fpu/s_cpowf.c
+++ b/sysdeps/alpha/fpu/s_cpowf.c
@@ -24,14 +24,19 @@
 
 #undef __cpowf
 #undef cpowf
-#define __cpowf internal_cpowf
 
 static _Complex float internal_cpowf (_Complex float x, _Complex float c);
 
-#include <math/s_cpowf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_cpowf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
 
-#undef __cpowf
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_cpow.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_cpowf (c1_cfloat_decl (x), c1_cfloat_decl (c))
diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c
index 30a24a8..c48c2e1 100644
--- a/sysdeps/alpha/fpu/s_cprojf.c
+++ b/sysdeps/alpha/fpu/s_cprojf.c
@@ -24,14 +24,19 @@
 
 #undef __cprojf
 #undef cprojf
-#define __cprojf internal_cprojf
 
 static _Complex float internal_cprojf (_Complex float x);
 
-#include <math/s_cprojf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_cprojf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
 
-#undef __cprojf
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_cproj.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_cprojf (c1_cfloat_decl (x))
diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c
index c7a18d7..b8731d3 100644
--- a/sysdeps/alpha/fpu/s_csqrtf.c
+++ b/sysdeps/alpha/fpu/s_csqrtf.c
@@ -24,14 +24,19 @@
 
 #undef __csqrtf
 #undef csqrtf
-#define __csqrtf internal_csqrtf
 
 static _Complex float internal_csqrtf (_Complex float x);
 
-#include <math/s_csqrtf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_csqrtf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
 
-#undef __csqrtf
+/* Disable any aliasing from base template.  */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_csqrt.c>
+#include "cfloat-compat.h"
 
 c1_cfloat_rettype
 __c1_csqrtf (c1_cfloat_decl (x))
diff --git a/sysdeps/ieee754/ldbl-opt/math-type-macros.h b/sysdeps/ieee754/ldbl-opt/math-type-macros.h
index 646489e..5e61eb2 100644
--- a/sysdeps/ieee754/ldbl-opt/math-type-macros.h
+++ b/sysdeps/ieee754/ldbl-opt/math-type-macros.h
@@ -19,5 +19,12 @@
 #define LDOUBLE_catanhl_libm_version GLIBC_2_1
 #define LDOUBLE_ctanl_libm_version GLIBC_2_1
 #define LDOUBLE_ctanhl_libm_version GLIBC_2_1
+#define LDOUBLE_cexpl_libm_version GLIBC_2_1
+#define LDOUBLE_clogl_libm_version GLIBC_2_1
+#define LDOUBLE_cprojl_libm_version GLIBC_2_1
+#define LDOUBLE_csqrtl_libm_version GLIBC_2_1
+#define LDOUBLE_cpowl_libm_version GLIBC_2_1
+#define LDOUBLE_clog10l_libm_version GLIBC_2_1
+#define LDOUBLE___clog10l_libm_version GLIBC_2_1
 
 #include_next <math-type-macros.h>
diff --git a/sysdeps/ieee754/ldbl-opt/s_cexp.c b/sysdeps/ieee754/ldbl-opt/s_cexp.c
deleted file mode 100644
index d983c96..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cexp.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_cexp.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __cexp, cexpl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_cexpl.c b/sysdeps/ieee754/ldbl-opt/s_cexpl.c
deleted file mode 100644
index d5ae1fc..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cexpl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_cexpl.c>
-long_double_symbol (libm, __cexpl, cexpl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_clog.c b/sysdeps/ieee754/ldbl-opt/s_clog.c
deleted file mode 100644
index 3e0e90c..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_clog.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_clog.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __clog, clogl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_clog10.c b/sysdeps/ieee754/ldbl-opt/s_clog10.c
deleted file mode 100644
index ac3f4a3..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_clog10.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_clog10.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __clog10, __clog10l, GLIBC_2_1);
-compat_symbol (libm, clog10, clog10l, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_clog10l.c b/sysdeps/ieee754/ldbl-opt/s_clog10l.c
deleted file mode 100644
index 954f680..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_clog10l.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#define __clog10l __clog10l_internal
-#include <math/s_clog10l.c>
-#undef __clog10l
-strong_alias (__clog10l_internal, __clog10l__internal)
-long_double_symbol (libm, __clog10l_internal, __clog10l);
-long_double_symbol (libm, __clog10l__internal, clog10l);
diff --git a/sysdeps/ieee754/ldbl-opt/s_clogl.c b/sysdeps/ieee754/ldbl-opt/s_clogl.c
deleted file mode 100644
index 75126c8..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_clogl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_clogl.c>
-long_double_symbol (libm, __clogl, clogl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_cpow.c b/sysdeps/ieee754/ldbl-opt/s_cpow.c
deleted file mode 100644
index 4801d7c..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cpow.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_cpow.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __cpow, cpowl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_cpowl.c b/sysdeps/ieee754/ldbl-opt/s_cpowl.c
deleted file mode 100644
index 61840e3..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cpowl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_cpowl.c>
-long_double_symbol (libm, __cpowl, cpowl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_cproj.c b/sysdeps/ieee754/ldbl-opt/s_cproj.c
deleted file mode 100644
index f298c37..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cproj.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_cproj.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __cproj, cprojl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_cprojl.c b/sysdeps/ieee754/ldbl-opt/s_cprojl.c
deleted file mode 100644
index 1cc0580..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cprojl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_cprojl.c>
-long_double_symbol (libm, __cprojl, cprojl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_csqrt.c b/sysdeps/ieee754/ldbl-opt/s_csqrt.c
deleted file mode 100644
index 2b6dcfe..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_csqrt.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_csqrt.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __csqrt, csqrtl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_csqrtl.c b/sysdeps/ieee754/ldbl-opt/s_csqrtl.c
deleted file mode 100644
index 045ff93..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_csqrtl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_csqrtl.c>
-long_double_symbol (libm, __csqrtl, csqrtl);
diff --git a/sysdeps/m68k/m680x0/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/b_cexp.c
similarity index 94%
rename from sysdeps/m68k/m680x0/fpu/s_cexp.c
rename to sysdeps/m68k/m680x0/fpu/b_cexp.c
index f715b77..4667f08 100644
--- a/sysdeps/m68k/m680x0/fpu/s_cexp.c
+++ b/sysdeps/m68k/m680x0/fpu/b_cexp.c
@@ -22,21 +22,14 @@
 #include <math.h>
 #include "mathimpl.h"
 
-#ifndef SUFF
-#define SUFF
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
 #define CONCATX(a,b) __CONCAT(a,b)
-#define s(name) CONCATX(name,SUFF)
+#define s(name) M_FUNC (name)
 #define m81(func) __m81_u(s(func))
 
-__complex__ float_type
-s(__cexp) (__complex__ float_type x)
+CFLOAT
+s(__cexp) (CFLOAT x)
 {
-  __complex__ float_type retval;
+  CFLOAT retval;
   unsigned long ix_cond;
 
   ix_cond = __m81_test (__imag__ x);
diff --git a/sysdeps/m68k/m680x0/fpu/s_cexpf.c b/sysdeps/m68k/m680x0/fpu/s_cexpf.c
deleted file mode 100644
index 177a360..0000000
--- a/sysdeps/m68k/m680x0/fpu/s_cexpf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SUFF f
-#define float_type float
-#include <s_cexp.c>
diff --git a/sysdeps/m68k/m680x0/fpu/s_cexpl.c b/sysdeps/m68k/m680x0/fpu/s_cexpl.c
deleted file mode 100644
index bbda4ba..0000000
--- a/sysdeps/m68k/m680x0/fpu/s_cexpl.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SUFF l
-#define float_type long double
-#include <s_cexp.c>
-- 
2.4.11


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]