29 #ifndef _GLIBCXX_TR1_COMPLEX
30 #define _GLIBCXX_TR1_COMPLEX 1
32 #pragma GCC system_header
34 #if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
35 # error TR1 header cannot be included from C++0x header
40 #if defined(_GLIBCXX_INCLUDE_AS_TR1)
43 # define _GLIBCXX_INCLUDE_AS_TR1
44 # define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
45 # define _GLIBCXX_END_NAMESPACE_TR1 }
46 # define _GLIBCXX_TR1 tr1::
49 # undef _GLIBCXX_END_NAMESPACE_TR1
50 # undef _GLIBCXX_BEGIN_NAMESPACE_TR1
51 # undef _GLIBCXX_INCLUDE_AS_TR1
64 template<
typename _Tp,
typename _Up>
66 polar(
const _Tp& __rho,
const _Up& __theta)
68 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
69 return std::polar(__type(__rho), __type(__theta));
74 template<
typename _Tp>
79 template<
typename _Tp>
84 template<
typename _Tp>
91 #endif // _GLIBCXX_TR1_COMPLEX
_Tp arg(const complex< _Tp > &)
Return phase angle of z.
complex< _Tp > pow(const complex< _Tp > &, const _Tp &)
Return x to the y'th power.
complex< _Tp > conj(const complex< _Tp > &)
Return complex conjugate of z.
_Tp norm(const complex< _Tp > &)
Return z magnitude squared.
complex< _Tp > polar(const _Tp &, const _Tp &=0)
Return complex with magnitude rho and angle theta.