diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-11 19:05:19 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-11 19:05:19 +0000 |
| commit | bf945d409b70a303f98b1a997aa4f7710f01e92c (patch) | |
| tree | 7fea5284943f7386e0e845ae37d6f6b729e7b9b9 /libstdc++-v3/include/std/std_complex.h | |
| parent | 415bd54e2060fac5995423c09726c3d4580bdc6a (diff) | |
| download | ppe42-gcc-bf945d409b70a303f98b1a997aa4f7710f01e92c.tar.gz ppe42-gcc-bf945d409b70a303f98b1a997aa4f7710f01e92c.zip | |
2004-03-11 Paolo Carlini <pcarlini@suse.de>
* include/std/std_complex.h (pow(const complex&, const _Tp&),
pow(const _Tp&, const complex&), pow(const complex&,
const complex&)): Fully qualify with std:: a few calls.
* testsuite/26_numerics/complex/13450.cc: Minor tweak.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79338 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/std_complex.h')
| -rw-r--r-- | libstdc++-v3/include/std/std_complex.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h index d997867c588..e1027f65991 100644 --- a/libstdc++-v3/include/std/std_complex.h +++ b/libstdc++-v3/include/std/std_complex.h @@ -708,7 +708,7 @@ namespace std if (__x.imag() == _Tp() && __x.real() > _Tp()) return pow(__x.real(), __y); - complex<_Tp> __t = log(__x); + complex<_Tp> __t = std::log(__x); return std::polar(exp(__y * __t.real()), __y * __t.imag()); } @@ -716,15 +716,16 @@ namespace std inline complex<_Tp> pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { - return __x == _Tp() ? _Tp() : exp(__y * log(__x)); + return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } template<typename _Tp> inline complex<_Tp> pow(const _Tp& __x, const complex<_Tp>& __y) { - return __x > _Tp() ? polar(pow(__x, __y.real()), __y.imag() * log(__x)) - : pow(complex<_Tp>(__x, _Tp()), __y); + return __x > _Tp() ? std::polar(pow(__x, __y.real()), + __y.imag() * log(__x)) + : std::pow(complex<_Tp>(__x, _Tp()), __y); } // 26.2.3 complex specializations |

