Lines Matching refs:complex

14     complex synopsis
20 class complex
25 complex(const T& re = T(), const T& im = T()); // constexpr in C++14
26 complex(const complex&); // constexpr in C++14
27 template<class X> complex(const complex<X>&); // constexpr in C++14
35 complex<T>& operator= (const T&);
36 complex<T>& operator+=(const T&);
37 complex<T>& operator-=(const T&);
38 complex<T>& operator*=(const T&);
39 complex<T>& operator/=(const T&);
41 complex& operator=(const complex&);
42 template<class X> complex<T>& operator= (const complex<X>&);
43 template<class X> complex<T>& operator+=(const complex<X>&);
44 template<class X> complex<T>& operator-=(const complex<X>&);
45 template<class X> complex<T>& operator*=(const complex<X>&);
46 template<class X> complex<T>& operator/=(const complex<X>&);
50 class complex<float>
55 constexpr complex(float re = 0.0f, float im = 0.0f);
56 explicit constexpr complex(const complex<double>&);
57 explicit constexpr complex(const complex<long double>&);
64 complex<float>& operator= (float);
65 complex<float>& operator+=(float);
66 complex<float>& operator-=(float);
67 complex<float>& operator*=(float);
68 complex<float>& operator/=(float);
70 complex<float>& operator=(const complex<float>&);
71 template<class X> complex<float>& operator= (const complex<X>&);
72 template<class X> complex<float>& operator+=(const complex<X>&);
73 template<class X> complex<float>& operator-=(const complex<X>&);
74 template<class X> complex<float>& operator*=(const complex<X>&);
75 template<class X> complex<float>& operator/=(const complex<X>&);
79 class complex<double>
84 constexpr complex(double re = 0.0, double im = 0.0);
85 constexpr complex(const complex<float>&);
86 explicit constexpr complex(const complex<long double>&);
93 complex<double>& operator= (double);
94 complex<double>& operator+=(double);
95 complex<double>& operator-=(double);
96 complex<double>& operator*=(double);
97 complex<double>& operator/=(double);
98 complex<double>& operator=(const complex<double>&);
100 template<class X> complex<double>& operator= (const complex<X>&);
101 template<class X> complex<double>& operator+=(const complex<X>&);
102 template<class X> complex<double>& operator-=(const complex<X>&);
103 template<class X> complex<double>& operator*=(const complex<X>&);
104 template<class X> complex<double>& operator/=(const complex<X>&);
108 class complex<long double>
113 constexpr complex(long double re = 0.0L, long double im = 0.0L);
114 constexpr complex(const complex<float>&);
115 constexpr complex(const complex<double>&);
122 complex<long double>& operator=(const complex<long double>&);
123 complex<long double>& operator= (long double);
124 complex<long double>& operator+=(long double);
125 complex<long double>& operator-=(long double);
126 complex<long double>& operator*=(long double);
127 complex<long double>& operator/=(long double);
129 template<class X> complex<long double>& operator= (const complex<X>&);
130 template<class X> complex<long double>& operator+=(const complex<X>&);
131 template<class X> complex<long double>& operator-=(const complex<X>&);
132 template<class X> complex<long double>& operator*=(const complex<X>&);
133 template<class X> complex<long double>& operator/=(const complex<X>&);
137 template<class T> complex<T> operator+(const complex<T>&, const complex<T>&);
138 template<class T> complex<T> operator+(const complex<T>&, const T&);
139 template<class T> complex<T> operator+(const T&, const complex<T>&);
140 template<class T> complex<T> operator-(const complex<T>&, const complex<T>&);
141 template<class T> complex<T> operator-(const complex<T>&, const T&);
142 template<class T> complex<T> operator-(const T&, const complex<T>&);
143 template<class T> complex<T> operator*(const complex<T>&, const complex<T>&);
144 template<class T> complex<T> operator*(const complex<T>&, const T&);
145 template<class T> complex<T> operator*(const T&, const complex<T>&);
146 template<class T> complex<T> operator/(const complex<T>&, const complex<T>&);
147 template<class T> complex<T> operator/(const complex<T>&, const T&);
148 template<class T> complex<T> operator/(const T&, const complex<T>&);
149 template<class T> complex<T> operator+(const complex<T>&);
150 template<class T> complex<T> operator-(const complex<T>&);
151 template<class T> bool operator==(const complex<T>&, const complex<T>&); // constexpr in C++14
152 template<class T> bool operator==(const complex<T>&, const T&); // constexpr in C++14
153 template<class T> bool operator==(const T&, const complex<T>&); // constexpr in C++14
154 template<class T> bool operator!=(const complex<T>&, const complex<T>&); // constexpr in C++14
155 template<class T> bool operator!=(const complex<T>&, const T&); // constexpr in C++14
156 template<class T> bool operator!=(const T&, const complex<T>&); // constexpr in C++14
160 operator>>(basic_istream<charT, traits>&, complex<T>&);
163 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
167 template<class T> T real(const complex<T>&); // constexpr in C++14
173 template<class T> T imag(const complex<T>&); // constexpr in C++14
179 template<class T> T abs(const complex<T>&);
181 template<class T> T arg(const complex<T>&);
187 template<class T> T norm(const complex<T>&);
193 template<class T> complex<T> conj(const complex<T>&);
194 complex<long double> conj(long double);
195 complex<double> conj(double);
196 template<Integral T> complex<double> conj(T);
197 complex<float> conj(float);
199 template<class T> complex<T> proj(const complex<T>&);
200 complex<long double> proj(long double);
201 complex<double> proj(double);
202 template<Integral T> complex<double> proj(T);
203 complex<float> proj(float);
205 template<class T> complex<T> polar(const T&, const T& = T());
208 template<class T> complex<T> acos(const complex<T>&);
209 template<class T> complex<T> asin(const complex<T>&);
210 template<class T> complex<T> atan(const complex<T>&);
211 template<class T> complex<T> acosh(const complex<T>&);
212 template<class T> complex<T> asinh(const complex<T>&);
213 template<class T> complex<T> atanh(const complex<T>&);
214 template<class T> complex<T> cos (const complex<T>&);
215 template<class T> complex<T> cosh (const complex<T>&);
216 template<class T> complex<T> exp (const complex<T>&);
217 template<class T> complex<T> log (const complex<T>&);
218 template<class T> complex<T> log10(const complex<T>&);
220 template<class T> complex<T> pow(const complex<T>&, const T&);
221 template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
222 template<class T> complex<T> pow(const T&, const complex<T>&);
224 template<class T> complex<T> sin (const complex<T>&);
225 template<class T> complex<T> sinh (const complex<T>&);
226 template<class T> complex<T> sqrt (const complex<T>&);
227 template<class T> complex<T> tan (const complex<T>&);
228 template<class T> complex<T> tanh (const complex<T>&);
252 template<class _Tp> class _LIBCPP_TEMPLATE_VIS complex;
254 template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
255 template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
258 class _LIBCPP_TEMPLATE_VIS complex
267 complex(const value_type& __re = value_type(), const value_type& __im = value_type())
270 complex(const complex<_Xp>& __c)
279 _LIBCPP_INLINE_VISIBILITY complex& operator= (const value_type& __re)
281 …_LIBCPP_INLINE_VISIBILITY complex& operator+=(const value_type& __re) {__re_ += __re; return *this…
282 …_LIBCPP_INLINE_VISIBILITY complex& operator-=(const value_type& __re) {__re_ -= __re; return *this…
283 …_LIBCPP_INLINE_VISIBILITY complex& operator*=(const value_type& __re) {__re_ *= __re; __im_ *= __r…
284 …_LIBCPP_INLINE_VISIBILITY complex& operator/=(const value_type& __re) {__re_ /= __re; __im_ /= __r…
286 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
292 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
298 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
304 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
306 *this = *this * complex(__c.real(), __c.imag());
309 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
311 *this = *this / complex(__c.real(), __c.imag());
316 template<> class _LIBCPP_TEMPLATE_VIS complex<double>;
317 template<> class _LIBCPP_TEMPLATE_VIS complex<long double>;
320 class _LIBCPP_TEMPLATE_VIS complex<float>
327 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(float __re = 0.0f, float __im = 0.0f)
330 explicit _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
332 explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
340 _LIBCPP_INLINE_VISIBILITY complex& operator= (float __re)
342 _LIBCPP_INLINE_VISIBILITY complex& operator+=(float __re) {__re_ += __re; return *this;}
343 _LIBCPP_INLINE_VISIBILITY complex& operator-=(float __re) {__re_ -= __re; return *this;}
344 …_LIBCPP_INLINE_VISIBILITY complex& operator*=(float __re) {__re_ *= __re; __im_ *= __re; return *t…
345 …_LIBCPP_INLINE_VISIBILITY complex& operator/=(float __re) {__re_ /= __re; __im_ /= __re; return *t…
347 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
353 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
359 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
365 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
367 *this = *this * complex(__c.real(), __c.imag());
370 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
372 *this = *this / complex(__c.real(), __c.imag());
378 class _LIBCPP_TEMPLATE_VIS complex<double>
385 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(double __re = 0.0, double __im = 0.0)
388 _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
390 explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
398 _LIBCPP_INLINE_VISIBILITY complex& operator= (double __re)
400 _LIBCPP_INLINE_VISIBILITY complex& operator+=(double __re) {__re_ += __re; return *this;}
401 _LIBCPP_INLINE_VISIBILITY complex& operator-=(double __re) {__re_ -= __re; return *this;}
402 …_LIBCPP_INLINE_VISIBILITY complex& operator*=(double __re) {__re_ *= __re; __im_ *= __re; return *…
403 …_LIBCPP_INLINE_VISIBILITY complex& operator/=(double __re) {__re_ /= __re; __im_ /= __re; return *…
405 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
411 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
417 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
423 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
425 *this = *this * complex(__c.real(), __c.imag());
428 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
430 *this = *this / complex(__c.real(), __c.imag());
436 class _LIBCPP_TEMPLATE_VIS complex<long double>
443 …_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(long double __re = 0.0L, long double __im = 0.…
446 _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
448 _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
456 _LIBCPP_INLINE_VISIBILITY complex& operator= (long double __re)
458 _LIBCPP_INLINE_VISIBILITY complex& operator+=(long double __re) {__re_ += __re; return *this;}
459 _LIBCPP_INLINE_VISIBILITY complex& operator-=(long double __re) {__re_ -= __re; return *this;}
460 …_LIBCPP_INLINE_VISIBILITY complex& operator*=(long double __re) {__re_ *= __re; __im_ *= __re; ret…
461 …_LIBCPP_INLINE_VISIBILITY complex& operator/=(long double __re) {__re_ /= __re; __im_ /= __re; ret…
463 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
469 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
475 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
481 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
483 *this = *this * complex(__c.real(), __c.imag());
486 template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
488 *this = *this / complex(__c.real(), __c.imag());
495 complex<float>::complex(const complex<double>& __c)
500 complex<float>::complex(const complex<long double>& __c)
505 complex<double>::complex(const complex<float>& __c)
510 complex<double>::complex(const complex<long double>& __c)
515 complex<long double>::complex(const complex<float>& __c)
520 complex<long double>::complex(const complex<double>& __c)
527 complex<_Tp>
528 operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
530 complex<_Tp> __t(__x);
537 complex<_Tp>
538 operator+(const complex<_Tp>& __x, const _Tp& __y)
540 complex<_Tp> __t(__x);
547 complex<_Tp>
548 operator+(const _Tp& __x, const complex<_Tp>& __y)
550 complex<_Tp> __t(__y);
557 complex<_Tp>
558 operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
560 complex<_Tp> __t(__x);
567 complex<_Tp>
568 operator-(const complex<_Tp>& __x, const _Tp& __y)
570 complex<_Tp> __t(__x);
577 complex<_Tp>
578 operator-(const _Tp& __x, const complex<_Tp>& __y)
580 complex<_Tp> __t(-__y);
586 complex<_Tp>
587 operator*(const complex<_Tp>& __z, const complex<_Tp>& __w)
641 return complex<_Tp>(__x, __y);
646 complex<_Tp>
647 operator*(const complex<_Tp>& __x, const _Tp& __y)
649 complex<_Tp> __t(__x);
656 complex<_Tp>
657 operator*(const _Tp& __x, const complex<_Tp>& __y)
659 complex<_Tp> __t(__y);
665 complex<_Tp>
666 operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
705 return complex<_Tp>(__x, __y);
710 complex<_Tp>
711 operator/(const complex<_Tp>& __x, const _Tp& __y)
713 return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
718 complex<_Tp>
719 operator/(const _Tp& __x, const complex<_Tp>& __y)
721 complex<_Tp> __t(__x);
728 complex<_Tp>
729 operator+(const complex<_Tp>& __x)
736 complex<_Tp>
737 operator-(const complex<_Tp>& __x)
739 return complex<_Tp>(-__x.real(), -__x.imag());
745 operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
753 operator==(const complex<_Tp>& __x, const _Tp& __y)
761 operator==(const _Tp& __x, const complex<_Tp>& __y)
769 operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
777 operator!=(const complex<_Tp>& __x, const _Tp& __y)
785 operator!=(const _Tp& __x, const complex<_Tp>& __y)
802 typedef complex<double> _ComplexType;
810 typedef complex<_Tp> _ComplexType;
818 real(const complex<_Tp>& __c)
836 imag(const complex<_Tp>& __c)
854 abs(const complex<_Tp>& __c)
864 arg(const complex<_Tp>& __c)
908 norm(const complex<_Tp>& __c)
930 complex<_Tp>
931 conj(const complex<_Tp>& __c)
933 return complex<_Tp>(__c.real(), -__c.imag());
951 complex<_Tp>
952 proj(const complex<_Tp>& __c)
954 complex<_Tp> __r = __c;
956 __r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag()));
971 return complex<_Tp>(__re);
990 complex<_Tp>
994 return complex<_Tp>(_Tp(NAN), _Tp(NAN));
998 return complex<_Tp>(__rho, __theta);
999 return complex<_Tp>(__theta, __theta);
1004 return complex<_Tp>(__rho, _Tp(NAN));
1005 return complex<_Tp>(_Tp(NAN), _Tp(NAN));
1013 return complex<_Tp>(__x, __y);
1020 complex<_Tp>
1021 log(const complex<_Tp>& __x)
1023 return complex<_Tp>(log(abs(__x)), arg(__x));
1030 complex<_Tp>
1031 log10(const complex<_Tp>& __x)
1039 complex<_Tp>
1040 sqrt(const complex<_Tp>& __x)
1043 return complex<_Tp>(_Tp(INFINITY), __x.imag());
1047 …return complex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(…
1048 …return complex<_Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real…
1056 complex<_Tp>
1057 exp(const complex<_Tp>& __x)
1061 return complex<_Tp>(exp(__x.real()), copysign(_Tp(0), __x.imag()));
1074 return complex<_Tp>(__x.real(), __i);
1078 return complex<_Tp>(__e * cos(__i), __e * sin(__i));
1085 complex<_Tp>
1086 pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
1093 complex<typename __promote<_Tp, _Up>::type>
1094 pow(const complex<_Tp>& __x, const complex<_Up>& __y)
1096 typedef complex<typename __promote<_Tp, _Up>::type> result_type;
1105 complex<typename __promote<_Tp, _Up>::type>
1107 pow(const complex<_Tp>& __x, const _Up& __y)
1109 typedef complex<typename __promote<_Tp, _Up>::type> result_type;
1118 complex<typename __promote<_Tp, _Up>::type>
1120 pow(const _Tp& __x, const complex<_Up>& __y)
1122 typedef complex<typename __promote<_Tp, _Up>::type> result_type;
1130 complex<_Tp>
1131 __sqr(const complex<_Tp>& __x)
1133 return complex<_Tp>((__x.real() - __x.imag()) * (__x.real() + __x.imag()),
1140 complex<_Tp>
1141 asinh(const complex<_Tp>& __x)
1149 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1150 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1155 return complex<_Tp>(__x.imag(), __x.real());
1158 return complex<_Tp>(__x.real(), __x.real());
1161 return complex<_Tp>(copysign(__x.imag(), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1162 complex<_Tp> __z = log(__x + sqrt(__sqr(__x) + _Tp(1)));
1163 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1169 complex<_Tp>
1170 acosh(const complex<_Tp>& __x)
1176 return complex<_Tp>(abs(__x.real()), __x.imag());
1180 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1182 return complex<_Tp>(-__x.real(), copysign(__pi * _Tp(0.75), __x.imag()));
1185 return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
1186 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1191 return complex<_Tp>(abs(__x.imag()), __x.real());
1192 return complex<_Tp>(__x.real(), __x.real());
1195 return complex<_Tp>(abs(__x.imag()), copysign(__pi/_Tp(2), __x.imag()));
1196 complex<_Tp> __z = log(__x + sqrt(__sqr(__x) - _Tp(1)));
1197 return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
1203 complex<_Tp>
1204 atanh(const complex<_Tp>& __x)
1209 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1214 return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
1215 return complex<_Tp>(__x.imag(), __x.imag());
1219 return complex<_Tp>(__x.real(), __x.real());
1223 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1227 return complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), copysign(_Tp(0), __x.imag()));
1229 complex<_Tp> __z = log((_Tp(1) + __x) / (_Tp(1) - __x)) / _Tp(2);
1230 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1236 complex<_Tp>
1237 sinh(const complex<_Tp>& __x)
1240 return complex<_Tp>(__x.real(), _Tp(NAN));
1242 return complex<_Tp>(__x.real(), _Tp(NAN));
1245 return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
1251 complex<_Tp>
1252 cosh(const complex<_Tp>& __x)
1255 return complex<_Tp>(abs(__x.real()), _Tp(NAN));
1257 return complex<_Tp>(_Tp(NAN), __x.real());
1259 return complex<_Tp>(_Tp(1), __x.imag());
1261 return complex<_Tp>(abs(__x.real()), __x.imag());
1262 return complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), sinh(__x.real()) * sin(__x.imag()));
1268 complex<_Tp>
1269 tanh(const complex<_Tp>& __x)
1274 return complex<_Tp>(copysign(_Tp(1), __x.real()), _Tp(0));
1275 … return complex<_Tp>(copysign(_Tp(1), __x.real()), copysign(_Tp(0), sin(_Tp(2) * __x.imag())));
1284 return complex<_Tp>(__2rsh > _Tp(0) ? _Tp(1) : _Tp(-1),
1286 return complex<_Tp>(__2rsh/__d, sin(__2i)/__d);
1292 complex<_Tp>
1293 asin(const complex<_Tp>& __x)
1295 complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
1296 return complex<_Tp>(__z.imag(), -__z.real());
1302 complex<_Tp>
1303 acos(const complex<_Tp>& __x)
1309 return complex<_Tp>(__x.imag(), __x.real());
1313 return complex<_Tp>(_Tp(0.75) * __pi, -__x.imag());
1314 return complex<_Tp>(_Tp(0.25) * __pi, -__x.imag());
1317 return complex<_Tp>(__pi, signbit(__x.imag()) ? -__x.real() : __x.real());
1318 return complex<_Tp>(_Tp(0), signbit(__x.imag()) ? __x.real() : -__x.real());
1323 return complex<_Tp>(__x.real(), -__x.imag());
1324 return complex<_Tp>(__x.real(), __x.real());
1327 return complex<_Tp>(__pi/_Tp(2), -__x.imag());
1329 return complex<_Tp>(__pi/_Tp(2), -__x.imag());
1330 complex<_Tp> __z = log(__x + sqrt(__sqr(__x) - _Tp(1)));
1332 return complex<_Tp>(abs(__z.imag()), abs(__z.real()));
1333 return complex<_Tp>(abs(__z.imag()), -abs(__z.real()));
1339 complex<_Tp>
1340 atan(const complex<_Tp>& __x)
1342 complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
1343 return complex<_Tp>(__z.imag(), -__z.real());
1349 complex<_Tp>
1350 sin(const complex<_Tp>& __x)
1352 complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
1353 return complex<_Tp>(__z.imag(), -__z.real());
1360 complex<_Tp>
1361 cos(const complex<_Tp>& __x)
1363 return cosh(complex<_Tp>(-__x.imag(), __x.real()));
1369 complex<_Tp>
1370 tan(const complex<_Tp>& __x)
1372 complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
1373 return complex<_Tp>(__z.imag(), -__z.real());
1378 operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
1404 __x = complex<_Tp>(__r, __i);
1415 __x = complex<_Tp>(__r, _Tp(0));
1428 __x = complex<_Tp>(__r, _Tp(0));
1441 operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
1453 // Literal suffix for complex number literals [complex.literals]
1458 constexpr complex<long double> operator""il(long double __im)
1463 constexpr complex<long double> operator""il(unsigned long long __im)
1469 constexpr complex<double> operator""i(long double __im)
1474 constexpr complex<double> operator""i(unsigned long long __im)
1480 constexpr complex<float> operator""if(long double __im)
1485 constexpr complex<float> operator""if(unsigned long long __im)