2000-12-08 Gabriel Dos Reis <gdr@codesourcery.com>
+ * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove ccosl,
+ cexpl, clog10l, csinhl, ctanhl, ctanl.
+ (EXTRA_DIST): Remove ccos, ccosf, csin, csinf, ccosh, ccoshf,
+ csing, csinhf, clog10, clog10f, ctan, ctanf, ctanh, ctanhf.
+ * libmath/Makefile.in: Regenarate.
+ * libmath/ccos.c: Remove.
+ * libmath/ccosf.c: Likewise.
+ * libmath/ccosl.c: Likewise.
+ * libmath/csin.c: Likewise.
+ * libmath/csinf.c: Likewise.
+ * libmath/csinl.c: Likewise.
+ * libmath/ctan.c: Likewise.
+ * libmath/ctanf.c: Likewise.
+ * libmath/ctanl.c: Likewise.
+ * libmath/ccosh.c: Likewise.
+ * libmath/ccoshf.c: Likewise.
+ * libmath/ccoshl.c: Likewise.
+ * libmath/csinh.c: Likewise.
+ * libmath/csinhf.c: Likewise.
+ * libmath/csinhl.c: Likewise.
+ * libmath/ctanh.c: Likewise.
+ * libmath/ctanhf.c: Likewise.
+ * libmath/ctanhl.c: Likewise.
+ * libmath/cexp.c: Likewise.
+ * libmath/cexpf.c: Likewise.
+ * libmath/cexpl.c: Likewise.
+ * libmath/clog10.c: Likewise.
+ * libmath/clog10f.c: Likewise.
+ * libmath/clog10l.c: Likewise.
+ * libmath/complex-stub.h: Remove forward declaration of functions
+ mentioned above.
+
+ * include/bits/std_complex.h(tan, tanh): Define primary templates.
+ (complex<>): Remove friend declarations for tan<> and tanh<>.
+ * src/complex.cc(tan, tanh): Remove specializations.
+
+ * acinclude.m4: Remove check for ccos, ccosf, ccosl, ccosh,
+ ccoshf, ccoshl, csin, csinf, csinl, csinh, csinhf, csinhl, cexp,
+ cexpf, cexpl, ctan, ctanf, ctanl, ctanh, ctanhf, ctanhl.
+ * aclocal.m4: Regenarate.
+ * configure: Regenarate.
+
+2000-12-08 Gabriel Dos Reis <gdr@codesourcery.com>
+
* acinclude.m4: Don't forget to remove check for cpowl as it is no
longer needed, nor is the corresponding stub existent.
* aclocal.m4: Regenarate.
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
- AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
- csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
+ AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
- AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl csinhl csinl \
- csqrtl ctanhl ctanl hypotl signbitl clog10l)
+ AC_REPLACE_MATHFUNCS(csqrtl hypotl signbitl)
fi
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
dnl Check for complex versions of math functions of platform.
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
- AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
- csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
+ AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
- AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl csinhl csinl \
- csqrtl ctanhl ctanl hypotl signbitl clog10l)
+ AC_REPLACE_MATHFUNCS(csqrtl hypotl signbitl)
fi
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
echo "$ac_t""no" 1>&6
fi
- for ac_func in ccos ccosf ccosh ccoshf cexp cexpf \
- csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
+ for ac_func in csqrt csqrtf nan hypot hypotf atan2f expf \
copysignf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17420: checking for $ac_func" >&5
+echo "configure:17418: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17425 "configure"
+#line 17423 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:17448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
if test x$ac_cv_func_atan2l = x"yes" \
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
- for ac_func in ccoshl ccosl cexpl csinhl csinl \
- csqrtl ctanhl ctanl hypotl signbitl clog10l
+ for ac_func in csqrtl hypotl signbitl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17483: checking for $ac_func" >&5
+echo "configure:17480: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17488 "configure"
+#line 17485 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:17511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6
-echo "configure:17545: checking for GNU C++ __complex__ support" >&5
+echo "configure:17542: checking for GNU C++ __complex__ support" >&5
if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 17559 "configure"
+#line 17556 "configure"
#include "confdefs.h"
struct dcomplex { __complex__ double x; }; \
dcomplex f(const dcomplex& x) { return dcomplex(x); }
dcomplex x; f(x);
; return 0; }
EOF
-if { (eval echo configure:17568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_complex=ok
else
fi
echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6
-echo "configure:17598: checking for GNU C++ __complex__ float support" >&5
+echo "configure:17595: checking for GNU C++ __complex__ float support" >&5
if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
};
EOB
cat > conftest.$ac_ext <<EOF
-#line 17631 "configure"
+#line 17628 "configure"
#include "confdefs.h"
#include "conftest.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:17638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_float_complex=ok
else
ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
-echo "configure:17672: checking for wchar.h" >&5
+echo "configure:17669: checking for wchar.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17677 "configure"
+#line 17674 "configure"
#include "confdefs.h"
#include <wchar.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_safe=`echo "wctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for wctype.h""... $ac_c" 1>&6
-echo "configure:17706: checking for wctype.h" >&5
+echo "configure:17703: checking for wctype.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17711 "configure"
+#line 17708 "configure"
#include "confdefs.h"
#include <wctype.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
-echo "configure:17742: checking for mbstate_t" >&5
+echo "configure:17739: checking for mbstate_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 17744 "configure"
+#line 17741 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t teststate;
; return 0; }
EOF
-if { (eval echo configure:17751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_native_mbstatet=yes
else
echo "$ac_t""$use_native_mbstatet" 1>&6
echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
-echo "configure:17764: checking for WCHAR_MIN and WCHAR_MAX" >&5
+echo "configure:17761: checking for WCHAR_MIN and WCHAR_MAX" >&5
cat > conftest.$ac_ext <<EOF
-#line 17766 "configure"
+#line 17763 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
int i = WCHAR_MIN; int j = WCHAR_MAX;
; return 0; }
EOF
-if { (eval echo configure:17773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_wchar_minmax=yes
else
echo "$ac_t""$has_wchar_minmax" 1>&6
echo $ac_n "checking for WEOF""... $ac_c" 1>&6
-echo "configure:17786: checking for WEOF" >&5
+echo "configure:17783: checking for WEOF" >&5
cat > conftest.$ac_ext <<EOF
-#line 17788 "configure"
+#line 17785 "configure"
#include "confdefs.h"
#include <wchar.h>
wint_t i = WEOF;
; return 0; }
EOF
-if { (eval echo configure:17797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_weof=yes
else
wcsrtombs mbsrtowcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17813: checking for $ac_func" >&5
+echo "configure:17810: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17818 "configure"
+#line 17815 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:17841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
-echo "configure:17868: checking for ISO C99 wchar_t support" >&5
+echo "configure:17865: checking for ISO C99 wchar_t support" >&5
if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
&& test x"$ac_wfuncs" = xyes; then
ac_isoC99_wchar_t=yes
ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
-echo "configure:17879: checking for iconv.h" >&5
+echo "configure:17876: checking for iconv.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17884 "configure"
+#line 17881 "configure"
#include "confdefs.h"
#include <iconv.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
-echo "configure:17913: checking for langinfo.h" >&5
+echo "configure:17910: checking for langinfo.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17918 "configure"
+#line 17915 "configure"
#include "confdefs.h"
#include <langinfo.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:17947: checking for iconv in -liconv" >&5
+echo "configure:17944: checking for iconv in -liconv" >&5
ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-liconv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17955 "configure"
+#line 17952 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
iconv()
; return 0; }
EOF
-if { (eval echo configure:17966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in iconv_open iconv_close iconv nl_langinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:17992: checking for $ac_func" >&5
+echo "configure:17989: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 17997 "configure"
+#line 17994 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:18020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
LIBS="$ac_save_LIBS"
echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
-echo "configure:18050: checking for XPG2 wchar_t support" >&5
+echo "configure:18047: checking for XPG2 wchar_t support" >&5
if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
&& test x"$ac_XPG2funcs" = xyes; then
ac_XPG2_wchar_t=yes
echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
-echo "configure:18060: checking for enabled wchar_t specializations" >&5
+echo "configure:18057: checking for enabled wchar_t specializations" >&5
if test x"$ac_isoC99_wchar_t" = xyes \
&& test x"$ac_XPG2_wchar_t" = xyes; then
libinst_wstring_la="libinst-wstring.la"
ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
-echo "configure:18086: checking for ctype.h" >&5
+echo "configure:18083: checking for ctype.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18091 "configure"
+#line 18088 "configure"
#include "confdefs.h"
#include <ctype.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:18096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ctype_default=yes
echo $ac_n "checking <ctype> for GNU/Linux""... $ac_c" 1>&6
-echo "configure:18117: checking <ctype> for GNU/Linux" >&5
+echo "configure:18114: checking <ctype> for GNU/Linux" >&5
cat > conftest.$ac_ext <<EOF
-#line 18119 "configure"
+#line 18116 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}
; return 0; }
EOF
-if { (eval echo configure:18130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_linux=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for FreeBSD 4.0""... $ac_c" 1>&6
-echo "configure:18149: checking <ctype> for FreeBSD 4.0" >&5
+echo "configure:18146: checking <ctype> for FreeBSD 4.0" >&5
cat > conftest.$ac_ext <<EOF
-#line 18151 "configure"
+#line 18148 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;}
; return 0; }
EOF
-if { (eval echo configure:18161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_bsd=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for FreeBSD 3.4""... $ac_c" 1>&6
-echo "configure:18181: checking <ctype> for FreeBSD 3.4" >&5
+echo "configure:18178: checking <ctype> for FreeBSD 3.4" >&5
cat > conftest.$ac_ext <<EOF
-#line 18183 "configure"
+#line 18180 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ _D + _P + _X + _G + __istype (a, 0);}
; return 0; }
EOF
-if { (eval echo configure:18193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_freebsd34=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for NetBSD""... $ac_c" 1>&6
-echo "configure:18213: checking <ctype> for NetBSD" >&5
+echo "configure:18210: checking <ctype> for NetBSD" >&5
cat > conftest.$ac_ext <<EOF
-#line 18215 "configure"
+#line 18212 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ _N + _P + _X + _tolower_tab_[a] + _toupper_tab_[a];}
; return 0; }
EOF
-if { (eval echo configure:18225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_netbsd=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for Solaris 2.6,7,8""... $ac_c" 1>&6
-echo "configure:18245: checking <ctype> for Solaris 2.6,7,8" >&5
+echo "configure:18242: checking <ctype> for Solaris 2.6,7,8" >&5
cat > conftest.$ac_ext <<EOF
-#line 18247 "configure"
+#line 18244 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}
; return 0; }
EOF
-if { (eval echo configure:18258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris=yes
if test $ctype_solaris = "yes"; then
echo $ac_n "checking for version""... $ac_c" 1>&6
-echo "configure:18273: checking for version" >&5
+echo "configure:18270: checking for version" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 18282 "configure"
+#line 18279 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
; return 0; }
EOF
-if { (eval echo configure:18289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris26=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for Solaris 2.5.1""... $ac_c" 1>&6
-echo "configure:18321: checking <ctype> for Solaris 2.5.1" >&5
+echo "configure:18318: checking <ctype> for Solaris 2.5.1" >&5
cat > conftest.$ac_ext <<EOF
-#line 18323 "configure"
+#line 18320 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ __ctype[a];}
; return 0; }
EOF
-if { (eval echo configure:18333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_solaris25=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for AIX""... $ac_c" 1>&6
-echo "configure:18353: checking <ctype> for AIX" >&5
+echo "configure:18350: checking <ctype> for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 18355 "configure"
+#line 18352 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ _VALC('a') + _IS('c', 0);}
; return 0; }
EOF
-if { (eval echo configure:18366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_aix=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for IRIX""... $ac_c" 1>&6
-echo "configure:18386: checking <ctype> for IRIX" >&5
+echo "configure:18383: checking <ctype> for IRIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 18388 "configure"
+#line 18385 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
_A + _PR + _G + _BL;}
; return 0; }
EOF
-if { (eval echo configure:18398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_irix=yes
if test $ctype_default = "yes"; then
echo $ac_n "checking <ctype> for newlib""... $ac_c" 1>&6
-echo "configure:18418: checking <ctype> for newlib" >&5
+echo "configure:18415: checking <ctype> for newlib" >&5
cat > conftest.$ac_ext <<EOF
-#line 18420 "configure"
+#line 18417 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
+ _ctype_[a];}
; return 0; }
EOF
-if { (eval echo configure:18430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
\
ctype_newlib=yes
for ac_func in strtof
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18470: checking for $ac_func" >&5
+echo "configure:18467: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18475 "configure"
+#line 18472 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:18498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for strtold declaration""... $ac_c" 1>&6
-echo "configure:18524: checking for strtold declaration" >&5
+echo "configure:18521: checking for strtold declaration" >&5
if test x${glibcpp_cv_func_strtold_use+set} != xset; then
if eval "test \"`echo '$''{'glibcpp_cv_func_strtold_use'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 18539 "configure"
+#line 18536 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main() {
strtold(0, 0);
; return 0; }
EOF
-if { (eval echo configure:18546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:18543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_func_strtold_use=yes
else
for ac_func in strtold
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18572: checking for $ac_func" >&5
+echo "configure:18569: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18577 "configure"
+#line 18574 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:18600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:18634: checking for $ac_hdr" >&5
+echo "configure:18631: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18639 "configure"
+#line 18636 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:18644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:18673: checking for $ac_func" >&5
+echo "configure:18670: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18678 "configure"
+#line 18675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:18701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:18726: checking for working mmap" >&5
+echo "configure:18723: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 18734 "configure"
+#line 18731 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:18874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:18871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for locale.h""... $ac_c" 1>&6
-echo "configure:18985: checking for locale.h" >&5
+echo "configure:18982: checking for locale.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 18990 "configure"
+#line 18987 "configure"
#include "confdefs.h"
#include <locale.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:18995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:19013: checking for LC_MESSAGES" >&5
+echo "configure:19010: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 19018 "configure"
+#line 19015 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:19025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_val_LC_MESSAGES=yes
else
# Check for the interface version number for specifying where header
# files are installed, if a version number is provided.
echo $ac_n "checking for interface version number""... $ac_c" 1>&6
-echo "configure:19067: checking for interface version number" >&5
+echo "configure:19064: checking for interface version number" >&5
libstdcxx_interface=$INTERFACE
echo "$ac_t""$libstdcxx_interface" 1>&6
# Process the option --with-gxx-include-dir=<path to include-files directory>
echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
-echo "configure:19074: checking for --with-gxx-include-dir" >&5
+echo "configure:19071: checking for --with-gxx-include-dir" >&5
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
withval="$with_gxx_include_dir"
# Process the option "--enable-version-specific-runtime-libs"
echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
-echo "configure:19108: checking for --enable-version-specific-runtime-libs" >&5
+echo "configure:19105: checking for --enable-version-specific-runtime-libs" >&5
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
if test "${enable_version_specific_runtime_libs+set}" = set; then
enableval="$enable_version_specific_runtime_libs"
template<typename _Tp>
inline complex<_Tp>
+ tan(const complex<_Tp>& __z)
+ {
+ return sin(__z) / cos(__z);
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ tanh(const complex<_Tp>& __z)
+ {
+ return sinh(__z) / cosh(__z);
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
pow(const complex<_Tp>& __z, int __n)
{
return __pow_helper(__z, __n);
friend class complex<long double>;
friend complex<float> sqrt<>(const complex<float>&);
- friend complex<float> tan<>(const complex<float>&);
- friend complex<float> tanh<>(const complex<float>&);
};
inline float
friend class complex<long double>;
friend complex<double> sqrt<>(const complex<double>&);
- friend complex<double> tan<>(const complex<double>&);
- friend complex<double> tanh<>(const complex<double>&);
};
inline double
friend class complex<double>;
friend complex<long double> sqrt<>(const complex<long double>&);
- friend complex<long double> tan<>(const complex<long double>&);
- friend complex<long double> tanh<>(const complex<long double>&);
};
inline
noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = \
- ccosl.c cexpl.c clog10l.c csinhl.c \
- csqrtl.c ctanhl.c ctanl.c hypotl.c \
- signbitl.c
+ csqrtl.c hypotl.c signbitl.c
EXTRA_DIST = \
- ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
- cexp.c cexpf.c clog10.c clog10f.c \
- csin.c csinf.c csinh.c csinhf.c \
- csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
- ctanhf.c hypot.c hypotf.c\
- atan2f.c expf.c \
+ csqrt.c csqrtf.c hypot.c hypotf.c atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes)
libmath_la_LIBADD = \
noinst_LTLIBRARIES = libmath.la
-EXTRA_LONG_DOUBLE_yes = \
- ccosl.c cexpl.c clog10l.c csinhl.c \
- csqrtl.c ctanhl.c ctanl.c hypotl.c \
- signbitl.c
+EXTRA_LONG_DOUBLE_yes = csqrtl.c hypotl.c signbitl.c
-EXTRA_DIST = \
- ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
- cexp.c cexpf.c clog10.c clog10f.c \
- csin.c csinf.c csinh.c csinhf.c \
- csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
- ctanhf.c hypot.c hypotf.c\
- atan2f.c expf.c \
- $(EXTRA_LONG_DOUBLE_yes)
+EXTRA_DIST = csqrt.c csqrtf.c hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes)
-libmath_la_LIBADD = \
- @LIBMATHOBJS@ \
- $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
+libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
-libmath_la_SOURCES = \
- signbit.c signbitf.c
+libmath_la_SOURCES = signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
-INCLUDES = \
- -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
- $(TOPLEVEL_INCLUDES)
+INCLUDES = -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
+++ /dev/null
-/* Return cosine of complex double value. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-__complex__ double
-ccos (__complex__ double x)
-{
- __complex__ double res;
-
- if (!FINITE_P (__real__ x) || __imag__ x != __imag__ x)
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = NAN;
- __imag__ res = 0.0;
- }
- else if (INFINITE_P (__imag__ x))
- {
- __real__ res = HUGE_VAL;
- __imag__ res = NAN;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = ccosh (y);
- }
-
- return res;
-}
+++ /dev/null
-/* Return cosine of complex float value. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-__complex__ float
-ccosf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!FINITEF_P (__real__ x) || __imag__ x != __imag__ x)
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = NAN;
- __imag__ res = 0.0;
- }
- else if (INFINITE_P (__imag__ x))
- {
- __real__ res = HUGE_VALF;
- __imag__ res = NAN;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = ccoshf (y);
- }
-
- return res;
-}
+++ /dev/null
-/* Complex cosine hyperbole function for double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-ccosh (__complex__ double x)
-{
- __complex__ double retval;
-
- if (FINITE_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double sinh_val = sinh (__real__ x);
- double cosh_val = cosh (__real__ x);
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : NAN;
- __real__ retval = NAN + NAN;
- }
- }
- else if (INFINITE_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * copysign (1.0, __real__ x);
- }
- else if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- __real__ retval = copysign (HUGE_VAL, cosix);
- __imag__ retval = (copysign (HUGE_VAL, sinix)
- * copysign (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex cosine hyperbole function for float. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-ccoshf (__complex__ float x)
-{
- __complex__ float retval;
-
- if (FINITEF_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float sinh_val = sinhf (__real__ x);
- float cosh_val = coshf (__real__ x);
- float sinix = sinf (__imag__ x);
- float cosix = cosf (__imag__ x);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : NAN;
- __real__ retval = NAN;
- }
- }
- else if (INFINITEF_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * copysignf (1.0, __real__ x);
- }
- else if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float sinix = sinf (__imag__ x);
- float cosix = cosf (__imag__ x);
-
- __real__ retval = copysignf (HUGE_VALF, cosix);
- __imag__ retval = (copysignf (HUGE_VALF, sinix)
- * copysignf (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex cosine hyperbole function for long double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-ccoshl (__complex__ long double x)
-{
- __complex__ long double retval;
-
- if (FINITEL_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double sinh_val = sinhl (__real__ x);
- long double cosh_val = coshl (__real__ x);
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : NAN;
- __real__ retval = NAN + NAN;
- }
- }
- else if (INFINITEL_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * copysignl (1.0, __real__ x);
- }
- else if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- __real__ retval = copysignl (HUGE_VALL, cosix);
- __imag__ retval = (copysignl (HUGE_VALL, sinix)
- * copysignl (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Return cosine of complex long double value. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-ccosl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!FINITEL_P (__real__ x) || __imag__ x != __imag__ x)
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = NAN;
- __imag__ res = 0.0;
- }
- else if (INFINITEL_P (__imag__ x))
- {
- __real__ res = HUGE_VALL;
- __imag__ res = NAN;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = ccoshl (y);
- }
-
- return res;
-}
+++ /dev/null
-/* Return value of complex exponential function for double complex value. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-cexp (__complex__ double x)
-{
- __complex__ double retval;
-
- if (FINITE_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double exp_val = exp (__real__ x);
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- if (FINITE_P (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = copysign (exp_val, cosix);
- __imag__ retval = copysign (exp_val, sinix);
- }
- }
- 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;
- }
- }
- else if (INFINITE_P (__real__ x))
- {
- /* Real part is infinite. */
- if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
-
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- __real__ retval = copysign (value, cosix);
- __imag__ retval = copysign (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VAL;
- __imag__ retval = NAN;
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = copysign (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Return value of complex exponential function for float complex value. */
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-cexpf (__complex__ float x)
-{
- __complex__ float retval;
-
- if (FINITEF_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float exp_val = expf (__real__ x);
- float sinix = sinf (__imag__ x);
- float cosix = cosf (__imag__ x);
-
- if (FINITEF_P (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = copysignf (exp_val, cosix);
- __imag__ retval = copysignf (exp_val, sinix);
- }
- }
- 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;
- }
- }
- else if (INFINITEF_P (__real__ x))
- {
- /* Real part is infinite. */
- if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
-
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- float sinix = sinf (__imag__ x);
- float cosix = cosf (__imag__ x);
-
- __real__ retval = copysignf (value, cosix);
- __imag__ retval = copysignf (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALF;
- __imag__ retval = NAN;
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = copysignf (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Return value of complex exp function for long double complex value. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-cexpl (__complex__ long double x)
-{
- __complex__ long double retval;
-
- if (FINITEL_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double exp_val = expl (__real__ x);
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- if (FINITEL_P (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = copysignl (exp_val, cosix);
- __imag__ retval = copysignl (exp_val, sinix);
- }
- }
- 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;
- }
- }
- else if (INFINITEL_P (__real__ x))
- {
- /* Real part is infinite. */
- if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
-
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- __real__ retval = copysignl (value, cosix);
- __imag__ retval = copysignl (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALL;
- __imag__ retval = NAN;
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = copysignl (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Compute complex base 10 logarithm. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-clog10 (__complex__ double x)
-{
- __complex__ double result;
-
- if (x == 0.0)
- {
- /* 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 (__real__ x != __real__ x && __imag__ x != __imag__ x)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = log10 (hypot (__real__ x, __imag__ x));
- __imag__ result = atan2 (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = NAN;
- if (INFINITE_P (__real__ x) || INFINITE_P (__imag__ x))
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VAL;
- else
- __real__ result = NAN;
- }
-
- return result;
-}
+++ /dev/null
-/* Compute complex base 10 logarithm. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-clog10f (__complex__ float x)
-{
- __complex__ float result;
-
- if (x == 0.0)
- {
- /* 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 (__real__ x == __real__ x && __imag__ x == __imag__ x)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = log10f (hypotf (__real__ x, __imag__ x));
- __imag__ result = atan2f (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = NAN;
- if (INFINITEF_P (__real__ x) || INFINITEF_P (__imag__ x))
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALF;
- else
- __real__ result = NAN;
- }
-
- return result;
-}
+++ /dev/null
-/* Compute complex natural logarithm. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <math.h>
-#include "mathconf.h"
-#ifndef M_PIl
-#define M_PIl M_PI
-#endif
-
-/* Thanks to SGI we have to trick here. At least Irix 6.2 provides hypotl,
- but it has a wrong prototype. Grrr. */
-extern long double local_hypotl (long double, long double) asm ("hypotl");
-
-
-__complex__ long double
-clog10l (__complex__ long double x)
-{
- __complex__ long double result;
-
- if (x == 0.0)
- {
- /* 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 (__real__ x == __real__ x && __imag__ x == __imag__ x)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = log10l (local_hypotl (__real__ x, __imag__ x));
- __imag__ result = atan2l (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = NAN;
- if (INFINITEL_P (__real__ x) || INFINITEL_P (__imag__ x))
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALL;
- else
- __real__ result = NAN;
- }
-
- return result;
-}
#ifndef _COMPLEX_H
#define _COMPLEX_H 1
-__complex__ double ccos (__complex__ double x);
-__complex__ float ccosf (__complex__ float x);
-__complex__ long double ccosl (__complex__ long double x);
-
-__complex__ double ccosh (__complex__ double x);
-__complex__ float ccoshf (__complex__ float x);
-__complex__ long double ccoshl (__complex__ long double x);
-
-__complex__ double cexp (__complex__ double x);
-__complex__ float cexpf (__complex__ float x);
-__complex__ long double cexpl (__complex__ long double x);
-
-__complex__ double clog10 (__complex__ double x);
-__complex__ float clog10f (__complex__ float x);
-__complex__ long double clog10l (__complex__ long double x);
-
-__complex__ double csin (__complex__ double x);
-__complex__ float csinf (__complex__ float x);
-__complex__ long double csinl (__complex__ long double x);
-
-__complex__ double csinh (__complex__ double x);
-__complex__ float csinhf (__complex__ float x);
-__complex__ long double csinhl (__complex__ long double x);
-
__complex__ double csqrt (__complex__ double x);
__complex__ float csqrtf (__complex__ float x);
__complex__ long double csqrtl (__complex__ long double x);
-__complex__ double ctan (__complex__ double x);
-__complex__ float ctanf (__complex__ float x);
-__complex__ long double ctanl (__complex__ long double x);
-
-__complex__ double ctanh (__complex__ double x);
-__complex__ float ctanhf (__complex__ float x);
-__complex__ long double ctanhl (__complex__ long double x);
-
-double carg (__complex__ double x);
-float cargf (__complex__ float x);
-long double cargl (__complex__ long double x);
-
#endif
+++ /dev/null
-/* Complex sine function for double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-csin (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- if (FINITE_P (__real__ x))
- {
- /* Real part is finite. */
- double sinh_val = sinh (__imag__ x);
- double cosh_val = cosh (__imag__ x);
- double sinix = sin (__real__ x);
- double cosix = cos (__real__ x);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = NAN;
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITE_P (__imag__ x))
- {
- /* Imaginary part is infinite. */
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (FINITE_P (__real__ x))
- {
- /* Real part is finite. */
- double sinix = sin (__real__ x);
- double cosix = cos (__real__ x);
-
- __real__ retval = copysign (HUGE_VAL, sinix);
- __imag__ retval = copysign (HUGE_VAL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = NAN;
- __imag__ retval = HUGE_VAL;
- }
- }
- else
- {
- if (__real__ x == 0.0)
- __real__ retval = copysign (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex sine function for float. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-csinf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- if (FINITEF_P (__real__ x))
- {
- /* Real part is finite. */
- float sinh_val = sinhf (__imag__ x);
- float cosh_val = coshf (__imag__ x);
- float sinix = sinf (__real__ x);
- float cosix = cosf (__real__ x);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = NAN;
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITEF_P (__imag__ x))
- {
- /* Imaginary part is infinite. */
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (FINITEF_P (__real__ x))
- {
- /* Real part is finite. */
- float sinix = sinf (__real__ x);
- float cosix = cosf (__real__ x);
-
- __real__ retval = copysignf (HUGE_VALF, sinix);
- __imag__ retval = copysignf (HUGE_VALF, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = NAN;
- __imag__ retval = HUGE_VALF;
- }
- }
- else
- {
- if (__real__ x == 0.0)
- __real__ retval = copysignf (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex sine hyperbole function for double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-csinh (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (FINITE_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double sinh_val = sinh (__real__ x);
- double cosh_val = cosh (__real__ x);
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = NAN + NAN;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITE_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
- __imag__ retval = __imag__ x;
- }
- else if (FINITE_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- double sinix = sin (__imag__ x);
- double cosix = cos (__imag__ x);
-
- __real__ retval = copysign (HUGE_VAL, cosix);
- __imag__ retval = copysign (HUGE_VAL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex sine hyperbole function for float.
- Copyright (C) 1997,1998 Free Software Foundation, Inc.
-
- This file is part of the libstdc++ version 3 distribution.
-
- This software is a copyrighted work licensed under the terms of the
- Cygnus libstdc++ license. Please consult the file LICENSE.STD for
- details. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-csinhf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (FINITEF_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float sinh_val = sinhf (__real__ x);
- float cosh_val = coshf (__real__ x);
- float sinix = sin (__imag__ x);
- float cosix = cos (__imag__ x);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = NAN + NAN;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITEF_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
- __imag__ retval = __imag__ x;
- }
- else if (FINITEF_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- float sinix = sinf (__imag__ x);
- float cosix = cosf (__imag__ x);
-
- __real__ retval = copysignf (HUGE_VALF, cosix);
- __imag__ retval = copysignf (HUGE_VALF, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex sine hyperbole function for long double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-csinhl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (FINITEL_P (__real__ x))
- {
- /* Real part is finite. */
- if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double sinh_val = sinhl (__real__ x);
- long double cosh_val = coshl (__real__ x);
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = NAN + NAN;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITEL_P (__real__ x))
- {
- /* Real part is infinite. */
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
- __imag__ retval = __imag__ x;
- }
- else if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- long double sinix = sinl (__imag__ x);
- long double cosix = cosl (__imag__ x);
-
- __real__ retval = copysignl (HUGE_VALL, cosix);
- __imag__ retval = copysignl (HUGE_VALL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = NAN + NAN;
- }
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex sine function for long double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-csinl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (FINITEL_P (__imag__ x))
- {
- /* Imaginary part is finite. */
- if (FINITEL_P (__real__ x))
- {
- /* Real part is finite. */
- long double sinh_val = sinhl (__imag__ x);
- long double cosh_val = coshl (__imag__ x);
- long double sinix = sinl (__real__ x);
- long double cosix = cosl (__real__ x);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (__imag__ x == 0.0)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = NAN;
- __imag__ retval = __imag__ x;
- }
- else
- {
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
- }
- }
- else if (INFINITEL_P (__imag__ x))
- {
- /* Imaginary part is infinite. */
- if (__real__ x == 0.0)
- {
- /* Real part is 0.0. */
- __real__ retval = copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (FINITEL_P (__real__ x))
- {
- /* Real part is finite. */
- long double sinix = sinl (__real__ x);
- long double cosix = cosl (__real__ x);
-
- __real__ retval = copysignl (HUGE_VALL, sinix);
- __imag__ retval = copysignl (HUGE_VALL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = NAN;
- __imag__ retval = HUGE_VALL;
- }
- }
- else
- {
- if (__real__ x == 0.0)
- __real__ retval = copysignl (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = NAN;
- __imag__ retval = NAN;
- }
-
- return retval;
-}
+++ /dev/null
-/* Complex tangent function for double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-ctan (__complex__ double x)
-{
- __complex__ double res;
-
- if (!FINITE_P (__real__ x) || !FINITE_P (__imag__ x))
- {
- if (INFINITE_P (__imag__ x))
- {
- __real__ res = copysign (0.0, __real__ x);
- __imag__ res = copysign (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- double sin2rx = sin (2.0 * __real__ x);
- double cos2rx = cos (2.0 * __real__ x);
- double den;
-
- den = cos2rx + cosh (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = sinh (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
+++ /dev/null
-/* Complex tangent function for float. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-ctanf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!FINITEF_P (__real__ x) || !FINITEF_P (__imag__ x))
- {
- if (INFINITEF_P (__imag__ x))
- {
- __real__ res = copysignf (0.0, __real__ x);
- __imag__ res = copysignf (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- float sin2rx = sinf (2.0f * __real__ x);
- float cos2rx = cosf (2.0f * __real__ x);
- float den;
-
- den = cos2rx + coshf (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = sinhf (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
+++ /dev/null
-/* Complex hyperbole tangent for double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ double
-ctanh (__complex__ double x)
-{
- __complex__ double res;
-
- if (!FINITE_P (__real__ x) || !FINITE_P (__imag__ x))
- {
- if (INFINITE_P (__real__ x))
- {
- __real__ res = copysign (1.0, __real__ x);
- __imag__ res = copysign (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- double sin2ix = sin (2.0 * __imag__ x);
- double cos2ix = cos (2.0 * __imag__ x);
- double den;
-
- den = (cosh (2.0 * __real__ x) + cos2ix);
-
- __real__ res = sinh (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
+++ /dev/null
-/* Complex hyperbole tangent for float. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-ctanhf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!FINITEF_P (__real__ x) || !FINITEF_P (__imag__ x))
- {
- if (INFINITEF_P (__real__ x))
- {
- __real__ res = copysignf (1.0, __real__ x);
- __imag__ res = copysignf (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- float sin2ix = sinf (2.0f * __imag__ x);
- float cos2ix = cosf (2.0f * __imag__ x);
- float den;
-
- den = (coshf (2.0 * __real__ x) + cos2ix);
-
- __real__ res = sinhf (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
+++ /dev/null
-/* Complex hyperbole tangent for long double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-ctanhl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!FINITEL_P (__real__ x) || !FINITEL_P (__imag__ x))
- {
- if (INFINITEL_P (__real__ x))
- {
- __real__ res = copysignl (1.0, __real__ x);
- __imag__ res = copysignl (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- long double sin2ix = sinl (2.0 * __imag__ x);
- long double cos2ix = cosl (2.0 * __imag__ x);
- long double den;
-
- den = (coshl (2.0 * __real__ x) + cos2ix);
-
- __real__ res = sinhl (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
+++ /dev/null
-/* Complex tangent function for long double. */
-
-/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
-
- This file is part of the GNU ISO C++ Library. This library is free
- software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this library; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ long double
-ctanl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!FINITEL_P (__real__ x) || !FINITEL_P (__imag__ x))
- {
- if (INFINITEL_P (__imag__ x))
- {
- __real__ res = copysignl (0.0, __real__ x);
- __imag__ res = copysignl (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = NAN;
- __imag__ res = NAN;
- }
- }
- else
- {
- long double sin2rx = sinl (2.0 * __real__ x);
- long double cos2rx = cosl (2.0 * __real__ x);
- long double den;
-
- den = cos2rx + coshl (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = sinhl (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
complex<FLT>
sqrt(const complex<FLT>& __x)
{ return complex<FLT>(csqrt(__x._M_value)); }
-
- template<>
- complex<FLT>
- tan(const complex<FLT>& __x)
- { return complex<FLT>(ctan(__x._M_value)); }
-
- template<>
- complex<FLT>
- tanh(const complex<FLT>& __x)
- { return complex<FLT>(ctanh(__x._M_value)); }
-
} // namespace std