mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-20 09:20:42 +08:00
complex (__complex_exp, pow): Specify the template parameter in calls to std::polar, for expression templates.
2014-04-11 Marc Glisse <marc.glisse@inria.fr> * include/std/complex (__complex_exp, pow): Specify the template parameter in calls to std::polar, for expression templates. From-SVN: r209321
This commit is contained in:
parent
d9bb58007e
commit
742f66e736
@ -1,3 +1,8 @@
|
||||
2014-04-11 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* include/std/complex (__complex_exp, pow): Specify the template
|
||||
parameter in calls to std::polar, for expression templates.
|
||||
|
||||
2014-04-10 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Remove TLS
|
||||
|
@ -735,7 +735,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
template<typename _Tp>
|
||||
inline complex<_Tp>
|
||||
__complex_exp(const complex<_Tp>& __z)
|
||||
{ return std::polar(exp(__z.real()), __z.imag()); }
|
||||
{ return std::polar<_Tp>(exp(__z.real()), __z.imag()); }
|
||||
|
||||
#if _GLIBCXX_USE_C99_COMPLEX
|
||||
inline __complex__ float
|
||||
@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
return pow(__x.real(), __y);
|
||||
|
||||
complex<_Tp> __t = std::log(__x);
|
||||
return std::polar(exp(__y * __t.real()), __y * __t.imag());
|
||||
return std::polar<_Tp>(exp(__y * __t.real()), __y * __t.imag());
|
||||
}
|
||||
|
||||
template<typename _Tp>
|
||||
@ -1032,8 +1032,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
inline complex<_Tp>
|
||||
pow(const _Tp& __x, const complex<_Tp>& __y)
|
||||
{
|
||||
return __x > _Tp() ? std::polar(pow(__x, __y.real()),
|
||||
__y.imag() * log(__x))
|
||||
return __x > _Tp() ? std::polar<_Tp>(pow(__x, __y.real()),
|
||||
__y.imag() * log(__x))
|
||||
: std::pow(complex<_Tp>(__x), __y);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user