aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-03-11 19:05:19 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-03-11 19:05:19 +0000
commitc6feb69790d5ed80fcd8697693ce50146269ba4c (patch)
tree7fea5284943f7386e0e845ae37d6f6b729e7b9b9
parent878cbb7399a6a2dc610f5d9fa8c812c8a2eb33c2 (diff)
downloadgcc-c6feb69790d5ed80fcd8697693ce50146269ba4c.zip
gcc-c6feb69790d5ed80fcd8697693ce50146269ba4c.tar.gz
gcc-c6feb69790d5ed80fcd8697693ce50146269ba4c.tar.bz2
std_complex.h (pow(const complex&, const _Tp&), [...]): Fully qualify with std:: a few calls.
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. From-SVN: r79338
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/std_complex.h9
-rw-r--r--libstdc++-v3/testsuite/26_numerics/complex/13450.cc2
3 files changed, 13 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8377536..7668e70 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2004-03-11 Steven Bosscher <s.bosscher@student.tudelft.nl>
PR libstdc++/11706
diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h
index d997867..e1027f6 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
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/13450.cc b/libstdc++-v3/testsuite/26_numerics/complex/13450.cc
index 9df257d..50f4bad 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/13450.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/13450.cc
@@ -29,7 +29,7 @@ template<typename T>
bool test __attribute__((unused)) = true;
typedef complex<T> cplx;
- T eps = numeric_limits<T>::epsilon() * 10;
+ T eps = numeric_limits<T>::epsilon() * 100;
cplx ref = pow(cplx(a, T()), cplx(b, T()));
cplx res1 = pow(a, cplx(b, T()));