@@ -53,7 +53,8 @@ libm-support = s_lib_version s_matherr s_signgam \
# defines libm-gen-calls-override and lists each function which should
# not use the default version. If declared, it is assumed the target
# 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
+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
libm-calls = \
e_acosF e_acoshF e_asinF e_atan2F e_atanhF e_coshF e_expF e_fmodF \
@@ -71,9 +72,9 @@ 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_csinhF s_ccoshF s_clogF \
- s_catanF s_casinF s_ccosF s_csinF s_ctanF s_ctanhF s_cacosF \
- s_casinhF s_cacoshF s_catanhF s_csqrtF s_cpowF s_cprojF s_clog10F \
+ s_cexpF s_csinhF s_clogF \
+ s_catanF s_casinF s_csinF s_ctanF s_ctanhF \
+ s_casinhF s_catanhF 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 k_casinhF \
gamma_productF lgamma_negF lgamma_productF \
new file mode 100644
@@ -0,0 +1,59 @@
+/* Return cosine of a complex 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.
+
+ 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>
+
+CFLOAT
+M_DECL_FUNC (__cacos) (CFLOAT x)
+{
+ CFLOAT y;
+ CFLOAT res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE
+ || (rcls == FP_ZERO && icls == FP_ZERO))
+ {
+ y = M_FUNC (__casin) (x);
+
+ __real__ res = (FLOAT) M_MLIT (M_PI_2) - __real__ y;
+ if (__real__ res == M_LIT (0.0))
+ __real__ res = M_LIT (0.0);
+ __imag__ res = -__imag__ y;
+ }
+ else
+ {
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = M_FUNC (__kernel_casinh) (y, 1);
+
+ __real__ res = __imag__ y;
+ __imag__ res = __real__ y;
+ }
+
+ return res;
+}
+
+declare_mgen_alias (__cacos, cacos);
+
+#if M_LIBM_NEED_COMPAT (carg)
+ declare_mgen_libm_compat (__cacos, cacos)
+#endif
new file mode 100644
@@ -0,0 +1,97 @@
+/* Return arc hyperbolic cosine for a complex 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.
+
+ 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>
+
+
+CFLOAT
+M_DECL_FUNC (__cacosh) (CFLOAT x)
+{
+ CFLOAT res;
+ int rcls = fpclassify (__real__ x);
+ int icls = fpclassify (__imag__ x);
+
+ if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ {
+ if (icls == FP_INFINITE)
+ {
+ __real__ res = M_HUGE_VAL;
+
+ if (rcls == FP_NAN)
+ __imag__ res = M_NAN;
+ else
+ __imag__ res = M_COPYSIGN ((rcls == FP_INFINITE
+ ? (__real__ x < M_LIT (0.0)
+ ? M_MLIT (M_PI) - M_MLIT (M_PI_4)
+ : M_MLIT (M_PI_4))
+ : M_MLIT (M_PI_2)), __imag__ x);
+ }
+ else if (rcls == FP_INFINITE)
+ {
+ __real__ res = M_HUGE_VAL;
+
+ if (icls >= FP_ZERO)
+ __imag__ res = M_COPYSIGN
+ (signbit (__real__ x) ? M_MLIT (M_PI) : M_LIT (0.0),
+ __imag__ x);
+ else
+ __imag__ res = M_NAN;
+ }
+ else
+ {
+ __real__ res = M_NAN;
+ __imag__ res = M_NAN;
+ }
+ }
+ else if (rcls == FP_ZERO && icls == FP_ZERO)
+ {
+ __real__ res = M_LIT (0.0);
+ __imag__ res = M_COPYSIGN (M_MLIT (M_PI_2), __imag__ x);
+ }
+ else
+ {
+ CFLOAT y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = M_FUNC (__kernel_casinh) (y, 1);
+
+ if (signbit (__imag__ x))
+ {
+ __real__ res = __real__ y;
+ __imag__ res = -__imag__ y;
+ }
+ else
+ {
+ __real__ res = -__real__ y;
+ __imag__ res = __imag__ y;
+ }
+ }
+
+ return res;
+}
+
+declare_mgen_alias (__cacosh, cacosh)
+
+#if M_LIBM_NEED_COMPAT (cacosh)
+ declare_mgen_libm_compat (__cacosh, cacosh)
+#endif
new file mode 100644
@@ -0,0 +1,40 @@
+/* Return cosine of complex 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.
+
+ 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>
+
+CFLOAT
+M_DECL_FUNC (__ccos) (CFLOAT x)
+{
+ CFLOAT y;
+
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ return M_FUNC (__ccosh) (y);
+}
+
+declare_mgen_alias (__ccos, ccos);
+
+#if M_LIBM_NEED_COMPAT (carg)
+ declare_mgen_libm_compat (__ccos, ccos)
+#endif
new file mode 100644
@@ -0,0 +1,154 @@
+/* Complex cosine hyperbolic function for float types.
+ 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>
+
+CFLOAT
+M_DECL_FUNC (__ccosh) (CFLOAT x)
+{
+ CFLOAT 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) ((M_MAX_EXP - 1) * M_MLIT (M_LN2));
+ FLOAT sinix, cosix;
+
+ if (__glibc_likely (M_FABS (__imag__ x) > M_MIN))
+ {
+ M_SINCOS (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = M_LIT (1.0);
+ }
+
+ if (M_FABS (__real__ x) > t)
+ {
+ FLOAT exp_t = M_EXP (t);
+ FLOAT rx = M_FABS (__real__ x);
+ if (signbit (__real__ x))
+ sinix = -sinix;
+ rx -= t;
+ sinix *= exp_t / M_LIT (2.0);
+ cosix *= exp_t / M_LIT (2.0);
+ if (rx > t)
+ {
+ rx -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ }
+ if (rx > t)
+ {
+ /* Overflow (original real part of x > 3t). */
+ __real__ retval = M_MAX * cosix;
+ __imag__ retval = M_MAX * sinix;
+ }
+ else
+ {
+ FLOAT exp_val = M_EXP (rx);
+ __real__ retval = exp_val * cosix;
+ __imag__ retval = exp_val * sinix;
+ }
+ }
+ else
+ {
+ __real__ retval = M_COSH (__real__ x) * cosix;
+ __imag__ retval = M_SINH (__real__ x) * sinix;
+ }
+
+ math_check_force_underflow_complex (retval);
+ }
+ else
+ {
+ __imag__ retval = __real__ x == M_LIT (0.0) ? M_LIT (0.0) : M_NAN;
+ __real__ retval = M_NAN + M_NAN;
+
+ if (icls == FP_INFINITE)
+ feraiseexcept (FE_INVALID);
+ }
+ }
+#if M_TYPE == M_DOUBLE
+ else if (rcls == FP_INFINITE)
+#else
+ else if (__glibc_likely (rcls == FP_INFINITE))
+#endif
+ {
+ /* Real part is infinite. */
+ if (__glibc_likely (icls > FP_ZERO))
+ {
+ /* Imaginary part is finite. */
+ FLOAT sinix, cosix;
+
+ if (__glibc_likely (M_FABS (__imag__ x) > M_MIN))
+ {
+ M_SINCOS (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = M_LIT (1.0);
+ }
+
+ __real__ retval = M_COPYSIGN (M_HUGE_VAL, cosix);
+ __imag__ retval = (M_COPYSIGN (M_HUGE_VAL, sinix)
+ * M_COPYSIGN (M_LIT (1.0), __real__ x));
+ }
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = M_HUGE_VAL;
+ __imag__ retval = __imag__ x * M_COPYSIGN (M_LIT (1.0), __real__ x);
+ }
+ else
+ {
+ /* The addition raises the invalid exception. */
+ __real__ retval = M_HUGE_VAL;
+ __imag__ retval = M_NAN + M_NAN;
+
+#if M_TYPE != M_FLOAT || defined (FE_INVALID)
+ if (icls == FP_INFINITE)
+ feraiseexcept (FE_INVALID);
+#endif
+ }
+ }
+ else
+ {
+ __real__ retval = M_NAN;
+ __imag__ retval = __imag__ x == M_LIT (0.0) ? __imag__ x : M_NAN;
+ }
+
+ return retval;
+}
+
+declare_mgen_alias (__ccosh, ccosh);
+
+#if M_LIBM_NEED_COMPAT (carg)
+ declare_mgen_libm_compat (__ccosh, ccosh)
+#endif
deleted file mode 100644
@@ -1,58 +0,0 @@
-/* Return cosine of complex double 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 <math.h>
-
-__complex__ double
-__cacos (__complex__ double x)
-{
- __complex__ double y;
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE
- || (rcls == FP_ZERO && icls == FP_ZERO))
- {
- y = __casin (x);
-
- __real__ res = (double) M_PI_2 - __real__ y;
- if (__real__ res == 0.0)
- __real__ res = 0.0;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinh (y, 1);
-
- __real__ res = __imag__ y;
- __imag__ res = __real__ y;
- }
-
- return res;
-}
-weak_alias (__cacos, cacos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacos, __cacosl)
-weak_alias (__cacos, cacosl)
-#endif
deleted file mode 100644
@@ -1,56 +0,0 @@
-/* Return cosine of complex float 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 <math.h>
-
-__complex__ float
-__cacosf (__complex__ float x)
-{
- __complex__ float y;
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE
- || (rcls == FP_ZERO && icls == FP_ZERO))
- {
- y = __casinf (x);
-
- __real__ res = (float) M_PI_2 - __real__ y;
- if (__real__ res == 0.0f)
- __real__ res = 0.0f;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinhf (y, 1);
-
- __real__ res = __imag__ y;
- __imag__ res = __real__ y;
- }
-
- return res;
-}
-#ifndef __cacosf
-weak_alias (__cacosf, cacosf)
-#endif
deleted file mode 100644
@@ -1,94 +0,0 @@
-/* Return arc hyperbole cosine for double 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 <math.h>
-#include <math_private.h>
-
-
-__complex__ double
-__cacosh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nan ("");
- else
- __imag__ res = __copysign ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysign (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinh (y, 1);
-
- if (signbit (__imag__ x))
- {
- __real__ res = __real__ y;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ res = -__real__ y;
- __imag__ res = __imag__ y;
- }
- }
-
- return res;
-}
-weak_alias (__cacosh, cacosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacosh, __cacoshl)
-weak_alias (__cacosh, cacoshl)
-#endif
deleted file mode 100644
@@ -1,92 +0,0 @@
-/* Return arc hyperbole cosine for float 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 <math.h>
-
-#include <math_private.h>
-
-__complex__ float
-__cacoshf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanf ("");
- else
- __imag__ res = __copysignf ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignf (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinhf (y, 1);
-
- if (signbit (__imag__ x))
- {
- __real__ res = __real__ y;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ res = -__real__ y;
- __imag__ res = __imag__ y;
- }
- }
-
- return res;
-}
-#ifndef __cacoshf
-weak_alias (__cacoshf, cacoshf)
-#endif
deleted file mode 100644
@@ -1,90 +0,0 @@
-/* Return arc hyperbole cosine for long double 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 <math.h>
-#include <math_private.h>
-
-
-__complex__ long double
-__cacoshl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanl ("");
- else
- __imag__ res = __copysignl ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PIl - M_PI_4l : M_PI_4l)
- : M_PI_2l), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignl (signbit (__real__ x) ? M_PIl : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinhl (y, 1);
-
- if (signbit (__imag__ x))
- {
- __real__ res = __real__ y;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ res = -__real__ y;
- __imag__ res = __imag__ y;
- }
- }
-
- return res;
-}
-weak_alias (__cacoshl, cacoshl)
deleted file mode 100644
@@ -1,54 +0,0 @@
-/* Return cosine of complex long double 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 <math.h>
-
-__complex__ long double
-__cacosl (__complex__ long double x)
-{
- __complex__ long double y;
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE
- || (rcls == FP_ZERO && icls == FP_ZERO))
- {
- y = __casinl (x);
-
- __real__ res = M_PI_2l - __real__ y;
- if (__real__ res == 0.0L)
- __real__ res = 0.0L;
- __imag__ res = -__imag__ y;
- }
- else
- {
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __kernel_casinhl (y, 1);
-
- __real__ res = __imag__ y;
- __imag__ res = __real__ y;
- }
-
- return res;
-}
-weak_alias (__cacosl, cacosl)
deleted file mode 100644
@@ -1,40 +0,0 @@
-/* Return cosine of complex double 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>
-
-
-__complex__ double
-__ccos (__complex__ double x)
-{
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- return __ccosh (y);
-}
-weak_alias (__ccos, ccos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccos, __ccosl)
-weak_alias (__ccos, ccosl)
-#endif
deleted file mode 100644
@@ -1,38 +0,0 @@
-/* Return cosine of complex float 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>
-
-
-__complex__ float
-__ccosf (__complex__ float x)
-{
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- return __ccoshf (y);
-}
-#ifndef __ccosf
-weak_alias (__ccosf, ccosf)
-#endif
deleted file mode 100644
@@ -1,147 +0,0 @@
-/* Complex cosine hyperbole function for double.
- 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
-__ccosh (__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 (fabs (__real__ x) > t)
- {
- double exp_t = __ieee754_exp (t);
- double rx = fabs (__real__ x);
- if (signbit (__real__ x))
- sinix = -sinix;
- rx -= t;
- sinix *= exp_t / 2.0;
- cosix *= exp_t / 2.0;
- if (rx > t)
- {
- rx -= t;
- sinix *= exp_t;
- cosix *= exp_t;
- }
- if (rx > t)
- {
- /* Overflow (original real part of x > 3t). */
- __real__ retval = DBL_MAX * cosix;
- __imag__ retval = DBL_MAX * sinix;
- }
- else
- {
- double exp_val = __ieee754_exp (rx);
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- }
- else
- {
- __real__ retval = __ieee754_cosh (__real__ x) * cosix;
- __imag__ retval = __ieee754_sinh (__real__ x) * sinix;
- }
-
- math_check_force_underflow_complex (retval);
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
- __real__ retval = __nan ("") + __nan ("");
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (__glibc_likely (icls > FP_ZERO))
- {
- /* Imaginary part is finite. */
- 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 (HUGE_VAL, cosix);
- __imag__ retval = (__copysign (HUGE_VAL, sinix)
- * __copysign (1.0, __real__ x));
- }
- else if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("") + __nan ("");
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
- }
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
- }
-
- return retval;
-}
-weak_alias (__ccosh, ccosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccosh, __ccoshl)
-weak_alias (__ccosh, ccoshl)
-#endif
deleted file mode 100644
@@ -1,147 +0,0 @@
-/* Complex cosine hyperbole function for float.
- 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
-__ccoshf (__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 (fabsf (__real__ x) > t)
- {
- float exp_t = __ieee754_expf (t);
- float rx = fabsf (__real__ x);
- if (signbit (__real__ x))
- sinix = -sinix;
- rx -= t;
- sinix *= exp_t / 2.0f;
- cosix *= exp_t / 2.0f;
- if (rx > t)
- {
- rx -= t;
- sinix *= exp_t;
- cosix *= exp_t;
- }
- if (rx > t)
- {
- /* Overflow (original real part of x > 3t). */
- __real__ retval = FLT_MAX * cosix;
- __imag__ retval = FLT_MAX * sinix;
- }
- else
- {
- float exp_val = __ieee754_expf (rx);
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- }
- else
- {
- __real__ retval = __ieee754_coshf (__real__ x) * cosix;
- __imag__ retval = __ieee754_sinhf (__real__ x) * sinix;
- }
-
- math_check_force_underflow_complex (retval);
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
- __real__ retval = __nanf ("");
-
- if (icls == FP_INFINITE)
- 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 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 (HUGE_VALF, cosix);
- __imag__ retval = (__copysignf (HUGE_VALF, sinix)
- * __copysignf (1.0, __real__ x));
- }
- else if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
- }
-
- return retval;
-}
-#ifndef __ccoshf
-weak_alias (__ccoshf, ccoshf)
-#endif
deleted file mode 100644
@@ -1,143 +0,0 @@
-/* Complex cosine hyperbole function for long double.
- 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
-__ccoshl (__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 (fabsl (__real__ x) > t)
- {
- long double exp_t = __ieee754_expl (t);
- long double rx = fabsl (__real__ x);
- if (signbit (__real__ x))
- sinix = -sinix;
- rx -= t;
- sinix *= exp_t / 2.0L;
- cosix *= exp_t / 2.0L;
- if (rx > t)
- {
- rx -= t;
- sinix *= exp_t;
- cosix *= exp_t;
- }
- if (rx > 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 (rx);
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- }
- else
- {
- __real__ retval = __ieee754_coshl (__real__ x) * cosix;
- __imag__ retval = __ieee754_sinhl (__real__ x) * sinix;
- }
-
- math_check_force_underflow_complex (retval);
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
- __real__ retval = __nanl ("") + __nanl ("");
-
- if (icls == FP_INFINITE)
- 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 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 (HUGE_VALL, cosix);
- __imag__ retval = (__copysignl (HUGE_VALL, sinix)
- * __copysignl (1.0, __real__ x));
- }
- else if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("") + __nanl ("");
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
- }
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__ccoshl, ccoshl)
deleted file mode 100644
@@ -1,36 +0,0 @@
-/* Return cosine of complex long double 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>
-
-
-__complex__ long double
-__ccosl (__complex__ long double x)
-{
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- return __ccoshl (y);
-}
-weak_alias (__ccosl, ccosl)
@@ -1,4 +1,6 @@
# Inhibit generation of these math files as they are supplied via
# 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
-libm-gen-replacement-calls = cabsf cargf cimagf crealf conjf
+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
+libm-gen-replacement-calls = cabsf cargf cimagf crealf conjf \
+ s_cacosf s_cacoshf s_ccosf s_ccoshf
@@ -24,11 +24,19 @@
#undef __cacosf
#undef cacosf
-#define __cacosf internal_cacosf
static _Complex float internal_cacosf (_Complex float x);
-#include <math/s_cacosf.c>
+#define M_DECL_FUNC(f) internal_cacosf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
+
+/* Disable any aliasing from base template. */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_cacos.c>
+
#include "cfloat-compat.h"
#undef __cacosf
@@ -24,11 +24,18 @@
#undef __cacoshf
#undef cacoshf
-#define __cacoshf internal_cacoshf
static _Complex float internal_cacoshf (_Complex float x);
-#include <math/s_cacoshf.c>
+#define M_DECL_FUNC(f) internal_cacoshf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
+
+/* Disable any aliasing from base template. */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_cacosh.c>
#include "cfloat-compat.h"
#undef __cacoshf
@@ -24,14 +24,19 @@
#undef __ccosf
#undef ccosf
-#define __ccosf internal_ccosf
static _Complex float internal_ccosf (_Complex float x);
-#include <math/s_ccosf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_ccosf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
-#undef __ccosf
+/* Disable any aliasing from base template. */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_ccos.c>
+#include "cfloat-compat.h"
c1_cfloat_rettype
__c1_ccosf (c1_cfloat_decl (x))
@@ -24,14 +24,19 @@
#undef __ccoshf
#undef ccoshf
-#define __ccoshf internal_ccoshf
static _Complex float internal_ccoshf (_Complex float x);
-#include <math/s_ccoshf.c>
-#include "cfloat-compat.h"
+#define M_DECL_FUNC(f) internal_ccoshf
+#define M_TYPE M_FLOAT
+#include <math-type-macros.h>
-#undef __ccoshf
+/* Disable any aliasing from base template. */
+#undef declare_mgen_alias
+#define declare_mgen_alias(__to, __from)
+
+#include <math/b_ccosh.c>
+#include "cfloat-compat.h"
c1_cfloat_rettype
__c1_ccoshf (c1_cfloat_decl (x))
@@ -7,5 +7,9 @@
#define LDOUBLE_cimagl_libm_version GLIBC_2_1
#define LDOUBLE_conjl_libm_version GLIBC_2_1
#define LDOUBLE_creall_libm_version GLIBC_2_1
+#define LDOUBLE_cacosl_libm_version GLIBC_2_1
+#define LDOUBLE_cacoshl_libm_version GLIBC_2_1
+#define LDOUBLE_ccosl_libm_version GLIBC_2_1
+#define LDOUBLE_ccoshl_libm_version GLIBC_2_1
#include_next <math-type-macros.h>
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_cacos.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __cacos, cacosl, GLIBC_2_1);
-#endif
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_cacosh.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __cacosh, cacoshl, GLIBC_2_1);
-#endif
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_cacoshl.c>
-long_double_symbol (libm, __cacoshl, cacoshl);
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_cacosl.c>
-long_double_symbol (libm, __cacosl, cacosl);
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_ccos.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __ccos, ccosl, GLIBC_2_1);
-#endif
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#include <math/s_ccosh.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __ccosh, ccoshl, GLIBC_2_1);
-#endif
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_ccoshl.c>
-long_double_symbol (libm, __ccoshl, ccoshl);
deleted file mode 100644
@@ -1,6 +0,0 @@
-#include <complex.h>
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <math/s_ccosl.c>
-long_double_symbol (libm, __ccosl, ccosl);
new file mode 100644
@@ -0,0 +1,68 @@
+/* Complex cosine hyperbole function. m68k fpu version
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ 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 "mathimpl.h"
+
+#define s(name) M_FUNC (name)
+#define m81(func) __m81_u(s(func))
+
+CFLOAT
+s(__ccosh) (CFLOAT x)
+{
+ CFLOAT retval;
+ unsigned long ix_cond = __m81_test (__imag__ x);
+
+ if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
+ {
+ /* Imaginary part is finite. */
+ FLOAT sin_ix, cos_ix;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x);
+ if (ix_cond & __M81_COND_ZERO)
+ __imag__ retval = (signbit (__real__ x)
+ ? -__imag__ x : __imag__ x);
+ else
+ __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x);
+ }
+ else
+ {
+ unsigned long rx_cond = __m81_test (__real__ x);
+
+ if (rx_cond & __M81_COND_ZERO)
+ {
+ __real__ retval = __imag__ x - __imag__ x;
+ __imag__ retval = __real__ x;
+ }
+ else
+ {
+ if (rx_cond & __M81_COND_INF)
+ __real__ retval = s(fabs) (__real__ x);
+ else
+ __real__ retval = s(__nan) ("");
+ __imag__ retval = __imag__ x - __imag__ x;
+ }
+ }
+
+ return retval;
+}
+weak_alias (s(__ccosh), s(ccosh))
deleted file mode 100644
@@ -1,76 +0,0 @@
-/* Complex cosine hyperbole function. m68k fpu version
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
-
- 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 "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 m81(func) __m81_u(s(func))
-
-__complex__ float_type
-s(__ccosh) (__complex__ float_type x)
-{
- __complex__ float_type retval;
- unsigned long ix_cond = __m81_test (__imag__ x);
-
- if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
- {
- /* Imaginary part is finite. */
- float_type sin_ix, cos_ix;
-
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x);
- if (ix_cond & __M81_COND_ZERO)
- __imag__ retval = (signbit (__real__ x)
- ? -__imag__ x : __imag__ x);
- else
- __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x);
- }
- else
- {
- unsigned long rx_cond = __m81_test (__real__ x);
-
- if (rx_cond & __M81_COND_ZERO)
- {
- __real__ retval = __imag__ x - __imag__ x;
- __imag__ retval = __real__ x;
- }
- else
- {
- if (rx_cond & __M81_COND_INF)
- __real__ retval = s(fabs) (__real__ x);
- else
- __real__ retval = s(__nan) ("");
- __imag__ retval = __imag__ x - __imag__ x;
- }
- }
-
- return retval;
-}
-weak_alias (s(__ccosh), s(ccosh))
deleted file mode 100644
@@ -1,3 +0,0 @@
-#define SUFF f
-#define float_type float
-#include <s_ccosh.c>
deleted file mode 100644
@@ -1,3 +0,0 @@
-#define SUFF l
-#define float_type long double
-#include <s_ccosh.c>