diff options
author | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2016-06-27 17:11:46 -0500 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2016-08-19 11:28:55 -0500 |
commit | 01ee387015a2075c45a4e1ad45d39e50b5a6d40b (patch) | |
tree | c8d2a88b0900c294d5e82fe869908d46b3ca838f /math/s_cacos_template.c | |
parent | 281f5073e5a6d2cd3733acd9c773c8c6340468c4 (diff) | |
download | glibc-01ee387015a2075c45a4e1ad45d39e50b5a6d40b.tar glibc-01ee387015a2075c45a4e1ad45d39e50b5a6d40b.tar.gz glibc-01ee387015a2075c45a4e1ad45d39e50b5a6d40b.tar.bz2 glibc-01ee387015a2075c45a4e1ad45d39e50b5a6d40b.zip |
Convert _Complex cosine functions to generated code
This is fairly straight fowards. m68k overrides are
updated to use the framework, and thus are simplified
a bit.
Diffstat (limited to 'math/s_cacos_template.c')
-rw-r--r-- | math/s_cacos_template.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/math/s_cacos_template.c b/math/s_cacos_template.c index 234b12271b..6494a1f2f6 100644 --- a/math/s_cacos_template.c +++ b/math/s_cacos_template.c @@ -1,4 +1,4 @@ -/* Return cosine of complex double value. +/* 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. @@ -20,22 +20,22 @@ #include <complex.h> #include <math.h> -__complex__ double -__cacos (__complex__ double x) +CFLOAT +M_DECL_FUNC (__cacos) (CFLOAT x) { - __complex__ double y; - __complex__ double res; + 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 = __casin (x); + y = M_SUF (__casin) (x); - __real__ res = (double) M_PI_2 - __real__ y; - if (__real__ res == 0.0) - __real__ res = 0.0; + __real__ res = (FLOAT) M_MLIT (M_PI_2) - __real__ y; + if (__real__ res == 0) + __real__ res = 0; __imag__ res = -__imag__ y; } else @@ -43,7 +43,7 @@ __cacos (__complex__ double x) __real__ y = -__imag__ x; __imag__ y = __real__ x; - y = __kernel_casinh (y, 1); + y = M_SUF (__kernel_casinh) (y, 1); __real__ res = __imag__ y; __imag__ res = __real__ y; @@ -51,8 +51,9 @@ __cacos (__complex__ double x) return res; } -weak_alias (__cacos, cacos) -#ifdef NO_LONG_DOUBLE -strong_alias (__cacos, __cacosl) -weak_alias (__cacos, cacosl) + +declare_mgen_alias (__cacos, cacos); + +#if M_LIBM_NEED_COMPAT (carg) +declare_mgen_libm_compat (__cacos, cacos) #endif |