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
270 : __re_(__c.real()), __im_(__c.imag()) {}
272 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
275 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
287 __re_ = __c.real();
293 __re_ += __c.real();
299 __re_ -= __c.real();
305 *this = *this * complex(__c.real(), __c.imag());
310 *this = *this / complex(__c.real(), __c.imag());
333 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float real() const {return __re_;}
336 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
348 __re_ = __c.real();
354 __re_ += __c.real();
360 __re_ -= __c.real();
366 *this = *this * complex(__c.real(), __c.imag());
371 *this = *this / complex(__c.real(), __c.imag());
391 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double real() const {return __re_;}
394 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
406 __re_ = __c.real();
412 __re_ += __c.real();
418 __re_ -= __c.real();
424 *this = *this * complex(__c.real(), __c.imag());
429 *this = *this / complex(__c.real(), __c.imag());
449 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double real() const {return __re_;}
452 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
464 __re_ = __c.real();
470 __re_ += __c.real();
476 __re_ -= __c.real();
482 *this = *this * complex(__c.real(), __c.imag());
487 *this = *this / complex(__c.real(), __c.imag());
495 : __re_(__c.real()), __im_(__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()) {}
588 _Tp __a = __z.real();
590 _Tp __c = __w.real();
668 _Tp __a = __z.real();
670 _Tp __c = __w.real();
712 return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
738 return complex<_Tp>(-__x.real(), -__x.imag());
746 return __x.real() == __y.real() && __x.imag() == __y.imag();
754 return __x.real() == __y && __x.imag() == 0;
762 return __x == __y.real() && 0 == __y.imag();
812 // real
817 real(const complex<_Tp>& __c)
819 return __c.real();
825 real(_Tp __re)
855 return hypot(__c.real(), __c.imag());
865 return atan2(__c.imag(), __c.real());
909 if (__libcpp_isinf_or_builtin(__c.real()))
910 return abs(__c.real());
913 return __c.real() * __c.real() + __c.imag() * __c.imag();
932 return complex<_Tp>(__c.real(), -__c.imag());
954 if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
1043 if (__libcpp_isinf_or_builtin(__x.real()))
1045 if (__x.real() > _Tp(0))
1046 …return complex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(…
1047 …Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), __x.imag()));
1059 if (__libcpp_isinf_or_builtin(__x.real()))
1061 if (__x.real() < _Tp(0))
1070 return complex<_Tp>(__x.real(), __i);
1073 else if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1075 _Tp __e = exp(__x.real());
1131 return complex<_Tp>((__x.real() - __x.imag()) * (__x.real() + __x.imag()),
1132 _Tp(2) * __x.real() * __x.imag());
1142 if (__libcpp_isinf_or_builtin(__x.real()))
1147 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1148 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1150 if (__libcpp_isnan_or_builtin(__x.real()))
1153 return complex<_Tp>(__x.imag(), __x.real());
1156 return complex<_Tp>(__x.real(), __x.real());
1159 return complex<_Tp>(copysign(__x.imag(), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1161 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1171 if (__libcpp_isinf_or_builtin(__x.real()))
1174 return complex<_Tp>(abs(__x.real()), __x.imag());
1177 if (__x.real() > 0)
1178 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1180 return complex<_Tp>(-__x.real(), copysign(__pi * _Tp(0.75), __x.imag()));
1182 if (__x.real() < 0)
1183 return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
1184 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1186 if (__libcpp_isnan_or_builtin(__x.real()))
1189 return complex<_Tp>(abs(__x.imag()), __x.real());
1190 return complex<_Tp>(__x.real(), __x.real());
1195 return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
1207 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1211 if (__libcpp_isinf_or_builtin(__x.real()) || __x.real() == 0)
1212 return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
1215 if (__libcpp_isnan_or_builtin(__x.real()))
1217 return complex<_Tp>(__x.real(), __x.real());
1219 if (__libcpp_isinf_or_builtin(__x.real()))
1221 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1223 if (abs(__x.real()) == _Tp(1) && __x.imag() == _Tp(0))
1225 return complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), copysign(_Tp(0), __x.imag()));
1228 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1237 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1238 return complex<_Tp>(__x.real(), _Tp(NAN));
1239 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1240 return complex<_Tp>(__x.real(), _Tp(NAN));
1241 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1243 return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
1252 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1253 return complex<_Tp>(abs(__x.real()), _Tp(NAN));
1254 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1255 return complex<_Tp>(_Tp(NAN), __x.real());
1256 if (__x.real() == 0 && __x.imag() == 0)
1258 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1259 return complex<_Tp>(abs(__x.real()), __x.imag());
1260 return complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), sinh(__x.real()) * sin(__x.imag()));
1269 if (__libcpp_isinf_or_builtin(__x.real()))
1275 if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1277 _Tp __2r(_Tp(2) * __x.real());
1293 complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
1294 return complex<_Tp>(__z.imag(), -__z.real());
1304 if (__libcpp_isinf_or_builtin(__x.real()))
1307 return complex<_Tp>(__x.imag(), __x.real());
1310 if (__x.real() < _Tp(0))
1314 if (__x.real() < _Tp(0))
1315 return complex<_Tp>(__pi, signbit(__x.imag()) ? -__x.real() : __x.real());
1316 return complex<_Tp>(_Tp(0), signbit(__x.imag()) ? __x.real() : -__x.real());
1318 if (__libcpp_isnan_or_builtin(__x.real()))
1321 return complex<_Tp>(__x.real(), -__x.imag());
1322 return complex<_Tp>(__x.real(), __x.real());
1326 if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag())))
1330 return complex<_Tp>(abs(__z.imag()), abs(__z.real()));
1331 return complex<_Tp>(abs(__z.imag()), -abs(__z.real()));
1340 complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
1341 return complex<_Tp>(__z.imag(), -__z.real());
1350 complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
1351 return complex<_Tp>(__z.imag(), -__z.real());
1361 return cosh(complex<_Tp>(-__x.imag(), __x.real()));
1370 complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
1371 return complex<_Tp>(__z.imag(), -__z.real());
1445 __s << '(' << __x.real() << ',' << __x.imag() << ')';