aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@codesourcery.com>2000-12-05 04:01:46 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2000-12-05 04:01:46 +0000
commitfad3e66e8e783dfb8a1985ab150e24996b0f8bf7 (patch)
tree03b6674b6d9557a4808e01491e4a7256cc0eaaba
parent9d86bffccb9b643d2e8b88399ee0a28d67bfb4b6 (diff)
downloadgcc-fad3e66e8e783dfb8a1985ab150e24996b0f8bf7.zip
gcc-fad3e66e8e783dfb8a1985ab150e24996b0f8bf7.tar.gz
gcc-fad3e66e8e783dfb8a1985ab150e24996b0f8bf7.tar.bz2
complex.cc (pow): Remove definitions for explicit specializations.
* src/complex.cc (pow): Remove definitions for explicit specializations. * libmath/mathconf.h: Remove declarations for c_log, c_logf, c_logl. * libmath/complex-stub.h: Remove declarations for cpow, cpowf, cpowl. * libmath/cpow.c: Remove. * libmath/cpowf.c: Remove. * libmath/cpowl.c: Remove. * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove c_logl, cpowl, (EXTRA_DIST): Remove c_log, c_logf, carg, cargf. * libmath/Makefile.in: Regenarate. * libmath/c_log.c: Remove * libmath/c_logf.c: Likewise. * libmath/c_logl.c: Likewise. * libmath/carg.c: Likewise. * libmath/cargf.c: Likewise. * libmath/cargl.c: Likewise. * include/bits/std_complex.h (pow): Define primary templates. (complex<>): Remove friend declarations for pow<>(). * acinclude.m4: Remove check for c_log, c_logf, c_logl, carg, cargf. * aclocal.m4: Regenarate. * configure: Regenarate. From-SVN: r38025
-rw-r--r--libstdc++-v3/ChangeLog28
-rw-r--r--libstdc++-v3/acinclude.m46
-rw-r--r--libstdc++-v3/aclocal.m46
-rwxr-xr-xlibstdc++-v3/configure6
-rw-r--r--libstdc++-v3/include/bits/std_complex.h50
-rw-r--r--libstdc++-v3/libmath/Makefile.am18
-rw-r--r--libstdc++-v3/libmath/Makefile.in4
-rw-r--r--libstdc++-v3/libmath/c_log.c63
-rw-r--r--libstdc++-v3/libmath/c_logf.c64
-rw-r--r--libstdc++-v3/libmath/c_logl.c75
-rw-r--r--libstdc++-v3/libmath/carg.c37
-rw-r--r--libstdc++-v3/libmath/cargf.c38
-rw-r--r--libstdc++-v3/libmath/cargl.c38
-rw-r--r--libstdc++-v3/libmath/complex-stub.h4
-rw-r--r--libstdc++-v3/libmath/cpow.c39
-rw-r--r--libstdc++-v3/libmath/cpowf.c38
-rw-r--r--libstdc++-v3/libmath/cpowl.c40
-rw-r--r--libstdc++-v3/libmath/mathconf.h3
-rw-r--r--libstdc++-v3/src/complex.cc20
19 files changed, 72 insertions, 505 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ed7d6ae..ce3fb4a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,31 @@
+2000-12-05 Gabriel Dos Reis <gdr@codesourcery.com>
+
+ * src/complex.cc (pow): Remove definitions for explicit
+ specializations.
+ * libmath/mathconf.h: Remove declarations for c_log, c_logf,
+ c_logl.
+ * libmath/complex-stub.h: Remove declarations for cpow, cpowf,
+ cpowl.
+ * libmath/cpow.c: Remove.
+ * libmath/cpowf.c: Remove.
+ * libmath/cpowl.c: Remove.
+ * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove c_logl,
+ cpowl,
+ (EXTRA_DIST): Remove c_log, c_logf, carg, cargf.
+ * libmath/Makefile.in: Regenarate.
+ * libmath/c_log.c: Remove
+ * libmath/c_logf.c: Likewise.
+ * libmath/c_logl.c: Likewise.
+ * libmath/carg.c: Likewise.
+ * libmath/cargf.c: Likewise.
+ * libmath/cargl.c: Likewise.
+ * include/bits/std_complex.h (pow): Define primary templates.
+ (complex<>): Remove friend declarations for pow<>().
+ * acinclude.m4: Remove check for c_log, c_logf, c_logl, carg,
+ cargf.
+ * aclocal.m4: Regenarate.
+ * configure: Regenarate.
+
2000-12-03 Joseph S. Myers <jsm28@cam.ac.uk>
* docs/configopts.html, docs/documentation.html,
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 3aa1ac6..24fa70e 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -743,8 +743,8 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
- c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
+ csin csinf csinh csinhf csqrt \
+ csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
@@ -756,7 +756,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
- csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
+ csqrtl ctanhl ctanl hypotl signbitl clog10l)
fi
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index a4e0148..78a933a 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -755,8 +755,8 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
AC_CHECK_HEADERS([complex.h])
AC_CHECK_LIB(m, main)
AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf \
- c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
+ csin csinf csinh csinhf csqrt \
+ csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
copysignf)
dnl Compile the long double complex functions only if the function
@@ -768,7 +768,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
- csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
+ csqrtl ctanhl ctanl hypotl signbitl clog10l)
fi
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 6a30003..bb40e46 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -17075,8 +17075,8 @@ else
fi
for ac_func in ccos ccosf ccosh ccoshf cexp cexpf \
- c_log c_logf clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt \
- csqrtf ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf \
+ csin csinf csinh csinhf csqrt \
+ csqrtf ctan ctanf ctanh ctanhf nan hypot hypotf atan2f expf \
copysignf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
@@ -17140,7 +17140,7 @@ done
&& test x$ac_cv_func_copysignl = x"yes"; then
USE_COMPLEX_LONG_DOUBLE=yes
for ac_func in ccoshl ccosl cexpl cpowl csinhl csinl \
- csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l
+ csqrtl ctanhl ctanl hypotl signbitl clog10l
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:17147: checking for $ac_func" >&5
diff --git a/libstdc++-v3/include/bits/std_complex.h b/libstdc++-v3/include/bits/std_complex.h
index de5ad9a..849e7eb 100644
--- a/libstdc++-v3/include/bits/std_complex.h
+++ b/libstdc++-v3/include/bits/std_complex.h
@@ -450,6 +450,34 @@ namespace std
return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
}
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __z, int __n)
+ {
+ return __pow_helper(__z, __n);
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ return exp(__y * log(__x));
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ return exp(__x * log(__x));
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ return exp(__y * log(__x));
+ }
+
// 26.2.3 complex specializations
// complex<float> specialization
template<> class complex<float>
@@ -496,11 +524,6 @@ namespace std
friend class complex<double>;
friend class complex<long double>;
- friend complex<float> pow<>(const complex<float>&, int);
- friend complex<float> pow<>(const complex<float>&, const float&);
- friend complex<float> pow<>(const complex<float>&,
- const complex<float>&);
- friend complex<float> pow<>(const float&, const complex<float>&);
friend complex<float> sqrt<>(const complex<float>&);
friend complex<float> tan<>(const complex<float>&);
friend complex<float> tanh<>(const complex<float>&);
@@ -651,11 +674,6 @@ namespace std
friend class complex<float>;
friend class complex<long double>;
- friend complex<double> pow<>(const complex<double>&, int);
- friend complex<double> pow<>(const complex<double>&, const double&);
- friend complex<double> pow<>(const complex<double>&,
- const complex<double>&);
- friend complex<double> pow<>(const double&, const complex<double>&);
friend complex<double> sqrt<>(const complex<double>&);
friend complex<double> tan<>(const complex<double>&);
friend complex<double> tanh<>(const complex<double>&);
@@ -806,13 +824,6 @@ namespace std
friend class complex<float>;
friend class complex<double>;
- friend complex<long double> pow<>(const complex<long double>&, int);
- friend complex<long double> pow<>(const complex<long double>&,
- const long double&);
- friend complex<long double> pow<>(const complex<long double>&,
- const complex<long double>&);
- friend complex<long double> pow<>(const long double&,
- const complex<long 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>&);
@@ -951,8 +962,3 @@ namespace std
} // namespace std
#endif /* _CPP_COMPLEX */
-
-
-
-
-
diff --git a/libstdc++-v3/libmath/Makefile.am b/libstdc++-v3/libmath/Makefile.am
index 2ad8f87..cf2251d 100644
--- a/libstdc++-v3/libmath/Makefile.am
+++ b/libstdc++-v3/libmath/Makefile.am
@@ -26,16 +26,16 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = \
- ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
- csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
+ ccosl.c cexpl.c clog10l.c csinhl.c \
+ csqrtl.c ctanhl.c ctanl.c hypotl.c \
signbitl.c
EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
- cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c \
- cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.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 carg.c cargf.c hypot.c hypotf.c\
+ ctanhf.c hypot.c hypotf.c\
atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes)
@@ -63,11 +63,3 @@ INCLUDES = \
-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
$(TOPLEVEL_INCLUDES)
-
-
-
-
-
-
-
-
diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in
index 32be74c..9525f29 100644
--- a/libstdc++-v3/libmath/Makefile.in
+++ b/libstdc++-v3/libmath/Makefile.in
@@ -113,10 +113,10 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libmath.la
-EXTRA_LONG_DOUBLE_yes = ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c signbitl.c
+EXTRA_LONG_DOUBLE_yes = ccosl.c cexpl.c clog10l.c csinhl.c csqrtl.c ctanhl.c ctanl.c hypotl.c signbitl.c
-EXTRA_DIST = ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c ctanhf.c carg.c cargf.c hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes)
+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)
libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
diff --git a/libstdc++-v3/libmath/c_log.c b/libstdc++-v3/libmath/c_log.c
deleted file mode 100644
index c3b8c55..0000000
--- a/libstdc++-v3/libmath/c_log.c
+++ /dev/null
@@ -1,63 +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. */
-
-#include <math.h>
-#include "mathconf.h"
-
-__complex__ double
-c_log (__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 = log (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;
-}
diff --git a/libstdc++-v3/libmath/c_logf.c b/libstdc++-v3/libmath/c_logf.c
deleted file mode 100644
index aff2111..0000000
--- a/libstdc++-v3/libmath/c_logf.c
+++ /dev/null
@@ -1,64 +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. */
-
-#include <math.h>
-#include "mathconf.h"
-
-
-__complex__ float
-c_logf (__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 = logf (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;
-}
diff --git a/libstdc++-v3/libmath/c_logl.c b/libstdc++-v3/libmath/c_logl.c
deleted file mode 100644
index d4075f7..0000000
--- a/libstdc++-v3/libmath/c_logl.c
+++ /dev/null
@@ -1,75 +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
-c_logl (__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 = logl (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;
-}
diff --git a/libstdc++-v3/libmath/carg.c b/libstdc++-v3/libmath/carg.c
deleted file mode 100644
index dff4a19..0000000
--- a/libstdc++-v3/libmath/carg.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Compute argument 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"
-
-double
-carg (__complex__ double x)
-{
- return atan2 (__imag__ x, __real__ x);
-}
diff --git a/libstdc++-v3/libmath/cargf.c b/libstdc++-v3/libmath/cargf.c
deleted file mode 100644
index 90a2f41..0000000
--- a/libstdc++-v3/libmath/cargf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Compute argument 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"
-
-float
-cargf (__complex__ float x)
-{
- return atan2f (__imag__ x, __real__ x);
-}
diff --git a/libstdc++-v3/libmath/cargl.c b/libstdc++-v3/libmath/cargl.c
deleted file mode 100644
index ede84a1..0000000
--- a/libstdc++-v3/libmath/cargl.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Compute argument 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"
-
-long double
-cargl (__complex__ long double x)
-{
- return atan2l (__imag__ x, __real__ x);
-}
diff --git a/libstdc++-v3/libmath/complex-stub.h b/libstdc++-v3/libmath/complex-stub.h
index bd3ebe6..ddfbce1 100644
--- a/libstdc++-v3/libmath/complex-stub.h
+++ b/libstdc++-v3/libmath/complex-stub.h
@@ -50,10 +50,6 @@ __complex__ double clog10 (__complex__ double x);
__complex__ float clog10f (__complex__ float x);
__complex__ long double clog10l (__complex__ long double x);
-__complex__ double cpow (__complex__ double x, __complex__ double c);
-__complex__ float cpowf (__complex__ float x, __complex__ float c);
-__complex__ long double cpowl (__complex__ long double x, __complex__ long double c);
-
__complex__ double csin (__complex__ double x);
__complex__ float csinf (__complex__ float x);
__complex__ long double csinl (__complex__ long double x);
diff --git a/libstdc++-v3/libmath/cpow.c b/libstdc++-v3/libmath/cpow.c
deleted file mode 100644
index 5d816a1..0000000
--- a/libstdc++-v3/libmath/cpow.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Complex power of double values. */
-
-/* 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
-cpow (__complex__ double x, __complex__ double c)
-{
- return cexp (c * c_log (x));
-}
diff --git a/libstdc++-v3/libmath/cpowf.c b/libstdc++-v3/libmath/cpowf.c
deleted file mode 100644
index d4aa590..0000000
--- a/libstdc++-v3/libmath/cpowf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Complex power of float values. */
-
-/* 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
-cpowf (__complex__ float x, __complex__ float c)
-{
- return cexpf (c * c_logf (x));
-}
diff --git a/libstdc++-v3/libmath/cpowl.c b/libstdc++-v3/libmath/cpowl.c
deleted file mode 100644
index 65856d4..0000000
--- a/libstdc++-v3/libmath/cpowl.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Complex power of long double values. */
-
-/* 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
-cpowl (__complex__ long double x, __complex__ long double c)
-{
- return cexpl (c * c_logl (x));
-}
-
-
-
diff --git a/libstdc++-v3/libmath/mathconf.h b/libstdc++-v3/libmath/mathconf.h
index c6e66e2..1d97f09 100644
--- a/libstdc++-v3/libmath/mathconf.h
+++ b/libstdc++-v3/libmath/mathconf.h
@@ -232,9 +232,6 @@ extern "C" {
#else
# include "complex-stub.h"
#endif
-__complex__ double c_log (__complex__ double x);
-__complex__ float c_logf (__complex__ float x);
-__complex__ long double c_logl (__complex__ long double x);
/* signbit is a macro in ISO C99. */
#ifndef signbit
diff --git a/libstdc++-v3/src/complex.cc b/libstdc++-v3/src/complex.cc
index 3dd4d7e..6d41b19 100644
--- a/libstdc++-v3/src/complex.cc
+++ b/libstdc++-v3/src/complex.cc
@@ -46,26 +46,6 @@ namespace std
{
template<>
complex<FLT>
- pow(const complex<FLT>& __x, int __n)
- { return complex<FLT>(cexp(__n * c_log(__x._M_value))); }
-
- template<>
- complex<FLT>
- pow(const complex<FLT>& __x, const FLT& __y)
- { return complex<FLT>(cexp(__y * c_log(__x._M_value))); }
-
- template<>
- complex<FLT>
- pow(const complex<FLT>& __x, const complex<FLT>& __y)
- { return complex<FLT>(cpow(__x._M_value, __y._M_value)); }
-
- template<>
- complex<FLT>
- pow(const FLT& __x, const complex<FLT>& __y)
- { return complex<FLT>(cexp(__y._M_value * log(__x))); }
-
- template<>
- complex<FLT>
sqrt(const complex<FLT>& __x)
{ return complex<FLT>(csqrt(__x._M_value)); }