Lines Matching refs:real

29     T real() const; // constexpr in C++14
32 void real(T);
59 constexpr float real() const;
60 void real(float);
88 constexpr double real() const;
89 void real(double);
117 constexpr long double real() const;
118 void real(long double);
167 template<class T> T real(const complex<T>&); // constexpr in C++14
168 long double real(long double); // constexpr in C++14
169 double real(double); // constexpr in C++14
170 template<Integral T> double real(T); // constexpr in C++14
171 float real(float); // constexpr in C++14
271 : __re_(__c.real()), __im_(__c.imag()) {}
273 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
276 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
288 __re_ = __c.real();
294 __re_ += __c.real();
300 __re_ -= __c.real();
306 *this = *this * complex(__c.real(), __c.imag());
311 *this = *this / complex(__c.real(), __c.imag());
334 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float real() const {return __re_;}
337 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
349 __re_ = __c.real();
355 __re_ += __c.real();
361 __re_ -= __c.real();
367 *this = *this * complex(__c.real(), __c.imag());
372 *this = *this / complex(__c.real(), __c.imag());
392 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double real() const {return __re_;}
395 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
407 __re_ = __c.real();
413 __re_ += __c.real();
419 __re_ -= __c.real();
425 *this = *this * complex(__c.real(), __c.imag());
430 *this = *this / complex(__c.real(), __c.imag());
450 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double real() const {return __re_;}
453 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
465 __re_ = __c.real();
471 __re_ += __c.real();
477 __re_ -= __c.real();
483 *this = *this * complex(__c.real(), __c.imag());
488 *this = *this / complex(__c.real(), __c.imag());
496 : __re_(__c.real()), __im_(__c.imag()) {}
501 : __re_(__c.real()), __im_(__c.imag()) {}
506 : __re_(__c.real()), __im_(__c.imag()) {}
511 : __re_(__c.real()), __im_(__c.imag()) {}
516 : __re_(__c.real()), __im_(__c.imag()) {}
521 : __re_(__c.real()), __im_(__c.imag()) {}
589 _Tp __a = __z.real();
591 _Tp __c = __w.real();
669 _Tp __a = __z.real();
671 _Tp __c = __w.real();
713 return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
739 return complex<_Tp>(-__x.real(), -__x.imag());
747 return __x.real() == __y.real() && __x.imag() == __y.imag();
755 return __x.real() == __y && __x.imag() == 0;
763 return __x == __y.real() && 0 == __y.imag();
813 // real
818 real(const complex<_Tp>& __c)
820 return __c.real();
826 real(_Tp __re)
856 return hypot(__c.real(), __c.imag());
866 return atan2(__c.imag(), __c.real());
910 if (__libcpp_isinf_or_builtin(__c.real()))
911 return abs(__c.real());
914 return __c.real() * __c.real() + __c.imag() * __c.imag();
933 return complex<_Tp>(__c.real(), -__c.imag());
955 if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
1044 if (__libcpp_isinf_or_builtin(__x.real()))
1046 if (__x.real() > _Tp(0))
1047 …return complex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(…
1048 …Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), __x.imag()));
1061 return complex<_Tp>(exp(__x.real()), copysign(_Tp(0), __x.imag()));
1063 if (__libcpp_isinf_or_builtin(__x.real()))
1065 if (__x.real() < _Tp(0))
1074 return complex<_Tp>(__x.real(), __i);
1077 _Tp __e = exp(__x.real());
1133 return complex<_Tp>((__x.real() - __x.imag()) * (__x.real() + __x.imag()),
1134 _Tp(2) * __x.real() * __x.imag());
1144 if (__libcpp_isinf_or_builtin(__x.real()))
1149 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1150 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1152 if (__libcpp_isnan_or_builtin(__x.real()))
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()));
1163 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1173 if (__libcpp_isinf_or_builtin(__x.real()))
1176 return complex<_Tp>(abs(__x.real()), __x.imag());
1179 if (__x.real() > 0)
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()));
1184 if (__x.real() < 0)
1185 return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
1186 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1188 if (__libcpp_isnan_or_builtin(__x.real()))
1191 return complex<_Tp>(abs(__x.imag()), __x.real());
1192 return complex<_Tp>(__x.real(), __x.real());
1197 return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
1209 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1213 if (__libcpp_isinf_or_builtin(__x.real()) || __x.real() == 0)
1214 return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
1217 if (__libcpp_isnan_or_builtin(__x.real()))
1219 return complex<_Tp>(__x.real(), __x.real());
1221 if (__libcpp_isinf_or_builtin(__x.real()))
1223 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1225 if (abs(__x.real()) == _Tp(1) && __x.imag() == _Tp(0))
1227 return complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), copysign(_Tp(0), __x.imag()));
1230 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1239 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1240 return complex<_Tp>(__x.real(), _Tp(NAN));
1241 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1242 return complex<_Tp>(__x.real(), _Tp(NAN));
1243 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1245 return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
1254 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1255 return complex<_Tp>(abs(__x.real()), _Tp(NAN));
1256 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1257 return complex<_Tp>(_Tp(NAN), __x.real());
1258 if (__x.real() == 0 && __x.imag() == 0)
1260 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
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()));
1271 if (__libcpp_isinf_or_builtin(__x.real()))
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())));
1277 if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1279 _Tp __2r(_Tp(2) * __x.real());
1295 complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
1296 return complex<_Tp>(__z.imag(), -__z.real());
1306 if (__libcpp_isinf_or_builtin(__x.real()))
1309 return complex<_Tp>(__x.imag(), __x.real());
1312 if (__x.real() < _Tp(0))
1316 if (__x.real() < _Tp(0))
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());
1320 if (__libcpp_isnan_or_builtin(__x.real()))
1323 return complex<_Tp>(__x.real(), -__x.imag());
1324 return complex<_Tp>(__x.real(), __x.real());
1328 if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag())))
1332 return complex<_Tp>(abs(__z.imag()), abs(__z.real()));
1333 return complex<_Tp>(abs(__z.imag()), -abs(__z.real()));
1342 complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
1343 return complex<_Tp>(__z.imag(), -__z.real());
1352 complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
1353 return complex<_Tp>(__z.imag(), -__z.real());
1363 return cosh(complex<_Tp>(-__x.imag(), __x.real()));
1372 complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
1373 return complex<_Tp>(__z.imag(), -__z.real());
1447 __s << '(' << __x.real() << ',' << __x.imag() << ')';