diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ed7d6ae911c..ce3fb4a4691 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,31 @@ +2000-12-05 Gabriel Dos Reis + + * 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 * docs/configopts.html, docs/documentation.html, diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 3aa1ac64ec6..24fa70ec0ad 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 a4e0148f837..78a933afdca 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 6a30003cb79..bb40e4690b7 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 de5ad9a97c5..849e7eb413c 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 + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { + return __pow_helper(__z, __n); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + return exp(__y * log(__x)); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + return exp(__x * log(__x)); + } + + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return exp(__y * log(__x)); + } + // 26.2.3 complex specializations // complex specialization template<> class complex @@ -496,11 +524,6 @@ namespace std friend class complex; friend class complex; - friend complex pow<>(const complex&, int); - friend complex pow<>(const complex&, const float&); - friend complex pow<>(const complex&, - const complex&); - friend complex pow<>(const float&, const complex&); friend complex sqrt<>(const complex&); friend complex tan<>(const complex&); friend complex tanh<>(const complex&); @@ -651,11 +674,6 @@ namespace std friend class complex; friend class complex; - friend complex pow<>(const complex&, int); - friend complex pow<>(const complex&, const double&); - friend complex pow<>(const complex&, - const complex&); - friend complex pow<>(const double&, const complex&); friend complex sqrt<>(const complex&); friend complex tan<>(const complex&); friend complex tanh<>(const complex&); @@ -806,13 +824,6 @@ namespace std friend class complex; friend class complex; - friend complex pow<>(const complex&, int); - friend complex pow<>(const complex&, - const long double&); - friend complex pow<>(const complex&, - const complex&); - friend complex pow<>(const long double&, - const complex&); friend complex sqrt<>(const complex&); friend complex tan<>(const complex&); friend complex tanh<>(const complex&); @@ -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 2ad8f87a907..cf2251dd43f 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 32be74c179f..9525f29fd5e 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 c3b8c558858..00000000000 --- 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 -#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 aff2111391c..00000000000 --- 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 -#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 d4075f75992..00000000000 --- 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 -#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 dff4a197836..00000000000 --- 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 -#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 90a2f417ccc..00000000000 --- 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 -#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 ede84a1c854..00000000000 --- 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 -#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 bd3ebe62197..ddfbce1aff5 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 5d816a1d0d6..00000000000 --- 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 -#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 d4aa5904f86..00000000000 --- 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 -#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 65856d48ec4..00000000000 --- 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 -#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 c6e66e2bf9c..1d97f0924cf 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 3dd4d7e05f1..6d41b19b2f0 100644 --- a/libstdc++-v3/src/complex.cc +++ b/libstdc++-v3/src/complex.cc @@ -44,26 +44,6 @@ namespace std { - template<> - complex - pow(const complex& __x, int __n) - { return complex(cexp(__n * c_log(__x._M_value))); } - - template<> - complex - pow(const complex& __x, const FLT& __y) - { return complex(cexp(__y * c_log(__x._M_value))); } - - template<> - complex - pow(const complex& __x, const complex& __y) - { return complex(cpow(__x._M_value, __y._M_value)); } - - template<> - complex - pow(const FLT& __x, const complex& __y) - { return complex(cexp(__y._M_value * log(__x))); } - template<> complex sqrt(const complex& __x)