• Home
  • Raw
  • Download

Lines Matching refs:imag

31     T imag() const; // constexpr in C++14
34 void imag(T);
62 constexpr float imag() const;
63 void imag(float);
91 constexpr double imag() const;
92 void imag(double);
120 constexpr long double imag() const;
121 void imag(long double);
174 template<class T> T imag(const complex<T>&); // constexpr in C++14
175 long double imag(long double); // constexpr in C++14
176 double imag(double); // constexpr in C++14
177 template<Integral T> double imag(T); // constexpr in C++14
178 float imag(float); // constexpr in C++14
275 : __re_(__c.real()), __im_(__c.imag()) {}
278 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type imag() const {return __im_;}
281 _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
293 __im_ = __c.imag();
299 __im_ += __c.imag();
305 __im_ -= __c.imag();
310 *this = *this * complex(__c.real(), __c.imag());
315 *this = *this / complex(__c.real(), __c.imag());
339 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float imag() const {return __im_;}
342 _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
354 __im_ = __c.imag();
360 __im_ += __c.imag();
366 __im_ -= __c.imag();
371 *this = *this * complex(__c.real(), __c.imag());
376 *this = *this / complex(__c.real(), __c.imag());
397 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double imag() const {return __im_;}
400 _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
412 __im_ = __c.imag();
418 __im_ += __c.imag();
424 __im_ -= __c.imag();
429 *this = *this * complex(__c.real(), __c.imag());
434 *this = *this / complex(__c.real(), __c.imag());
455 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double imag() const {return __im_;}
458 _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
470 __im_ = __c.imag();
476 __im_ += __c.imag();
482 __im_ -= __c.imag();
487 *this = *this * complex(__c.real(), __c.imag());
492 *this = *this / complex(__c.real(), __c.imag());
500 : __re_(__c.real()), __im_(__c.imag()) {}
505 : __re_(__c.real()), __im_(__c.imag()) {}
510 : __re_(__c.real()), __im_(__c.imag()) {}
515 : __re_(__c.real()), __im_(__c.imag()) {}
520 : __re_(__c.real()), __im_(__c.imag()) {}
525 : __re_(__c.real()), __im_(__c.imag()) {}
594 _Tp __b = __z.imag();
596 _Tp __d = __w.imag();
674 _Tp __b = __z.imag();
676 _Tp __d = __w.imag();
717 return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
743 return complex<_Tp>(-__x.real(), -__x.imag());
751 return __x.real() == __y.real() && __x.imag() == __y.imag();
759 return __x.real() == __y && __x.imag() == 0;
767 return __x == __y.real() && 0 == __y.imag();
835 // imag
840 imag(const complex<_Tp>& __c)
842 return __c.imag();
848 imag(_Tp)
860 return hypot(__c.real(), __c.imag());
870 return atan2(__c.imag(), __c.real());
916 if (__libcpp_isinf_or_builtin(__c.imag()))
917 return abs(__c.imag());
918 return __c.real() * __c.real() + __c.imag() * __c.imag();
937 return complex<_Tp>(__c.real(), -__c.imag());
959 if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
960 __r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag()));
1046 if (__libcpp_isinf_or_builtin(__x.imag()))
1047 return complex<_Tp>(_Tp(INFINITY), __x.imag());
1051 …plex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(0), __x.im…
1052 …rn complex<_Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), …
1063 _Tp __i = __x.imag();
1078 else if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1136 return complex<_Tp>((__x.real() - __x.imag()) * (__x.real() + __x.imag()),
1137 _Tp(2) * __x.real() * __x.imag());
1149 if (__libcpp_isnan_or_builtin(__x.imag()))
1151 if (__libcpp_isinf_or_builtin(__x.imag()))
1152 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1153 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1157 if (__libcpp_isinf_or_builtin(__x.imag()))
1158 return complex<_Tp>(__x.imag(), __x.real());
1159 if (__x.imag() == 0)
1163 if (__libcpp_isinf_or_builtin(__x.imag()))
1164 return complex<_Tp>(copysign(__x.imag(), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1166 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1178 if (__libcpp_isnan_or_builtin(__x.imag()))
1179 return complex<_Tp>(abs(__x.real()), __x.imag());
1180 if (__libcpp_isinf_or_builtin(__x.imag()))
1183 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1185 return complex<_Tp>(-__x.real(), copysign(__pi * _Tp(0.75), __x.imag()));
1188 return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
1189 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1193 if (__libcpp_isinf_or_builtin(__x.imag()))
1194 return complex<_Tp>(abs(__x.imag()), __x.real());
1197 if (__libcpp_isinf_or_builtin(__x.imag()))
1198 return complex<_Tp>(abs(__x.imag()), copysign(__pi/_Tp(2), __x.imag()));
1200 return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
1210 if (__libcpp_isinf_or_builtin(__x.imag()))
1212 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1214 if (__libcpp_isnan_or_builtin(__x.imag()))
1217 return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
1218 return complex<_Tp>(__x.imag(), __x.imag());
1226 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1228 if (abs(__x.real()) == _Tp(1) && __x.imag() == _Tp(0))
1230 return complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), copysign(_Tp(0), __x.imag()));
1233 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1242 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1244 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1246 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1248 return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
1257 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1259 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1261 if (__x.real() == 0 && __x.imag() == 0)
1262 return complex<_Tp>(_Tp(1), __x.imag());
1263 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1264 return complex<_Tp>(abs(__x.real()), __x.imag());
1265 return complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), sinh(__x.real()) * sin(__x.imag()));
1276 if (!__libcpp_isfinite_or_builtin(__x.imag()))
1278 return complex<_Tp>(_Tp(1), copysign(_Tp(0), sin(_Tp(2) * __x.imag())));
1280 if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1283 _Tp __2i(_Tp(2) * __x.imag());
1298 complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
1299 return complex<_Tp>(__z.imag(), -__z.real());
1311 if (__libcpp_isnan_or_builtin(__x.imag()))
1312 return complex<_Tp>(__x.imag(), __x.real());
1313 if (__libcpp_isinf_or_builtin(__x.imag()))
1316 return complex<_Tp>(_Tp(0.75) * __pi, -__x.imag());
1317 return complex<_Tp>(_Tp(0.25) * __pi, -__x.imag());
1320 return complex<_Tp>(__pi, signbit(__x.imag()) ? -__x.real() : __x.real());
1321 return complex<_Tp>(_Tp(0), signbit(__x.imag()) ? __x.real() : -__x.real());
1325 if (__libcpp_isinf_or_builtin(__x.imag()))
1326 return complex<_Tp>(__x.real(), -__x.imag());
1329 if (__libcpp_isinf_or_builtin(__x.imag()))
1330 return complex<_Tp>(__pi/_Tp(2), -__x.imag());
1331 if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag())))
1332 return complex<_Tp>(__pi/_Tp(2), -__x.imag());
1334 if (signbit(__x.imag()))
1335 return complex<_Tp>(abs(__z.imag()), abs(__z.real()));
1336 return complex<_Tp>(abs(__z.imag()), -abs(__z.real()));
1345 complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
1346 return complex<_Tp>(__z.imag(), -__z.real());
1355 complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
1356 return complex<_Tp>(__z.imag(), -__z.real());
1366 return cosh(complex<_Tp>(-__x.imag(), __x.real()));
1375 complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
1376 return complex<_Tp>(__z.imag(), -__z.real());
1449 __s << '(' << __x.real() << ',' << __x.imag() << ')';