Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove ccosl, cexpl, clog10l, csinhl, ctanhl, ctanl.

* 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.

From-SVN: r38128
This commit is contained in:
Gabriel Dos Reis 2000-12-08 05:57:48 +00:00 committed by Gabriel Dos Reis
parent ecddf6a806
commit 0ba2a514ef
33 changed files with 176 additions and 2291 deletions

View File

@ -1,3 +1,47 @@
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

View File

@ -754,9 +754,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
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
@ -767,8 +765,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
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)

View File

@ -766,9 +766,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
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
@ -779,8 +777,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
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)

217
libstdc++-v3/configure vendored
View File

@ -17410,18 +17410,16 @@ else
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. */
@ -17444,7 +17442,7 @@ $ac_func();
; 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
@ -17475,16 +17473,15 @@ done
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. */
@ -17507,7 +17504,7 @@ $ac_func();
; 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
@ -17541,7 +17538,7 @@ done
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
@ -17555,7 +17552,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
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); }
@ -17564,7 +17561,7 @@ int main() {
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
@ -17594,7 +17591,7 @@ EOF
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
@ -17627,14 +17624,14 @@ cross_compiling=$ac_cv_prog_cxx_cross
};
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
@ -17668,17 +17665,17 @@ EOF
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*
@ -17702,17 +17699,17 @@ fi
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*
@ -17738,16 +17735,16 @@ fi
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
@ -17760,16 +17757,16 @@ rm -f conftest*
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
@ -17782,9 +17779,9 @@ rm -f conftest*
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>
@ -17793,7 +17790,7 @@ int main() {
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
@ -17809,12 +17806,12 @@ rm -f conftest*
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. */
@ -17837,7 +17834,7 @@ $ac_func();
; 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
@ -17864,7 +17861,7 @@ done
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
@ -17875,17 +17872,17 @@ echo "configure:17868: checking for ISO C99 wchar_t support" >&5
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*
@ -17909,17 +17906,17 @@ fi
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*
@ -17943,7 +17940,7 @@ fi
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
@ -17951,7 +17948,7 @@ else
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
@ -17962,7 +17959,7 @@ int main() {
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
@ -17988,12 +17985,12 @@ fi
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. */
@ -18016,7 +18013,7 @@ $ac_func();
; 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
@ -18046,7 +18043,7 @@ done
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
@ -18056,7 +18053,7 @@ echo "configure:18050: checking for XPG2 wchar_t support" >&5
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"
@ -18082,17 +18079,17 @@ EOF
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*
@ -18113,9 +18110,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
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() {
@ -18126,7 +18123,7 @@ int
+ __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
@ -18145,9 +18142,9 @@ rm -f conftest*
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() {
@ -18157,7 +18154,7 @@ int
+ _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
@ -18177,9 +18174,9 @@ rm -f conftest*
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() {
@ -18189,7 +18186,7 @@ int
+ _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
@ -18209,9 +18206,9 @@ rm -f conftest*
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() {
@ -18221,7 +18218,7 @@ int
+ _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
@ -18241,9 +18238,9 @@ rm -f conftest*
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() {
@ -18254,7 +18251,7 @@ int
+ __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
@ -18269,7 +18266,7 @@ rm -f conftest*
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'
@ -18278,14 +18275,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
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
@ -18317,9 +18314,9 @@ cross_compiling=$ac_cv_prog_cc_cross
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() {
@ -18329,7 +18326,7 @@ int
+ __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
@ -18349,9 +18346,9 @@ rm -f conftest*
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() {
@ -18362,7 +18359,7 @@ int
+ _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
@ -18382,9 +18379,9 @@ rm -f conftest*
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() {
@ -18394,7 +18391,7 @@ int
_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
@ -18414,9 +18411,9 @@ rm -f conftest*
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() {
@ -18426,7 +18423,7 @@ int
+ _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
@ -18466,12 +18463,12 @@ fi
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. */
@ -18494,7 +18491,7 @@ $ac_func();
; 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
@ -18520,7 +18517,7 @@ done
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
@ -18535,14 +18532,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
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
@ -18568,12 +18565,12 @@ fi
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. */
@ -18596,7 +18593,7 @@ $ac_func();
; 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
@ -18630,17 +18627,17 @@ done
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*
@ -18669,12 +18666,12 @@ done
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. */
@ -18697,7 +18694,7 @@ $ac_func();
; 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
@ -18722,7 +18719,7 @@ fi
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
@ -18730,7 +18727,7 @@ 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.
@ -18870,7 +18867,7 @@ main()
}
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
@ -18981,17 +18978,17 @@ rm -f confcache
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*
@ -19009,19 +19006,19 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
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
@ -19063,14 +19060,14 @@ INTERFACE=v3
# 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"
@ -19104,7 +19101,7 @@ fi
# 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"

View File

@ -450,6 +450,20 @@ namespace std
return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
}
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)
@ -525,8 +539,6 @@ namespace std
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
@ -675,8 +687,6 @@ namespace std
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
@ -825,8 +835,6 @@ namespace std
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

View File

@ -26,17 +26,10 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
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 = \

View File

@ -113,31 +113,18 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
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 $@
@ -151,9 +138,7 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
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

View File

@ -1,68 +0,0 @@
/* 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;
}

View File

@ -1,68 +0,0 @@
/* 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;
}

View File

@ -1,93 +0,0 @@
/* 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;
}

View File

@ -1,92 +0,0 @@
/* 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;
}

View File

@ -1,92 +0,0 @@
/* 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;
}

View File

@ -1,69 +0,0 @@
/* 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;
}

View File

@ -1,111 +0,0 @@
/* 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;
}

View File

@ -1,110 +0,0 @@
/* 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;
}

View File

@ -1,110 +0,0 @@
/* 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;
}

View File

@ -1,65 +0,0 @@
/* 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;
}

View File

@ -1,64 +0,0 @@
/* 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;
}

View File

@ -1,74 +0,0 @@
/* 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;
}

View File

@ -34,45 +34,9 @@
#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

View File

@ -1,115 +0,0 @@
/* 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;
}

View File

@ -1,115 +0,0 @@
/* 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;
}

View File

@ -1,110 +0,0 @@
/* 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;
}

View File

@ -1,89 +0,0 @@
/* 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;
}

View File

@ -1,110 +0,0 @@
/* 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;
}

View File

@ -1,115 +0,0 @@
/* 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;
}

View File

@ -1,70 +0,0 @@
/* 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;
}

View File

@ -1,70 +0,0 @@
/* 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;
}

View File

@ -1,70 +0,0 @@
/* 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;
}

View File

@ -1,70 +0,0 @@
/* 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;
}

View File

@ -1,70 +0,0 @@
/* 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;
}

View File

@ -1,69 +0,0 @@
/* 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;
}

View File

@ -48,15 +48,4 @@ namespace std
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