• Home
  • Raw
  • Download

Lines Matching refs:real

30     T real() const; // constexpr in C++14
33 void real(T);
60 constexpr float real() const;
61 void real(float);
89 constexpr double real() const;
90 void real(double);
118 constexpr long double real() const;
119 void real(long double);
168 template<class T> T real(const complex<T>&); // constexpr in C++14
169 long double real(long double); // constexpr in C++14
170 double real(double); // constexpr in C++14
171 template<Integral T> double real(T); // constexpr in C++14
172 float real(float); // constexpr in C++14
274 : __re_(__c.real()), __im_(__c.imag()) {}
276 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
279 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
291 __re_ = __c.real();
297 __re_ += __c.real();
303 __re_ -= __c.real();
309 *this = *this * complex(__c.real(), __c.imag());
314 *this = *this / complex(__c.real(), __c.imag());
337 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float real() const {return __re_;}
340 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
352 __re_ = __c.real();
358 __re_ += __c.real();
364 __re_ -= __c.real();
370 *this = *this * complex(__c.real(), __c.imag());
375 *this = *this / complex(__c.real(), __c.imag());
395 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double real() const {return __re_;}
398 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
410 __re_ = __c.real();
416 __re_ += __c.real();
422 __re_ -= __c.real();
428 *this = *this * complex(__c.real(), __c.imag());
433 *this = *this / complex(__c.real(), __c.imag());
453 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double real() const {return __re_;}
456 _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
468 __re_ = __c.real();
474 __re_ += __c.real();
480 __re_ -= __c.real();
486 *this = *this * complex(__c.real(), __c.imag());
491 *this = *this / complex(__c.real(), __c.imag());
499 : __re_(__c.real()), __im_(__c.imag()) {}
504 : __re_(__c.real()), __im_(__c.imag()) {}
509 : __re_(__c.real()), __im_(__c.imag()) {}
514 : __re_(__c.real()), __im_(__c.imag()) {}
519 : __re_(__c.real()), __im_(__c.imag()) {}
524 : __re_(__c.real()), __im_(__c.imag()) {}
592 _Tp __a = __z.real();
594 _Tp __c = __w.real();
672 _Tp __a = __z.real();
674 _Tp __c = __w.real();
716 return complex<_Tp>(__x.real() / __y, __x.imag() / __y);
742 return complex<_Tp>(-__x.real(), -__x.imag());
750 return __x.real() == __y.real() && __x.imag() == __y.imag();
758 return __x.real() == __y && __x.imag() == 0;
766 return __x == __y.real() && 0 == __y.imag();
816 // real
821 real(const complex<_Tp>& __c)
823 return __c.real();
829 real(_Tp __re)
859 return hypot(__c.real(), __c.imag());
869 return atan2(__c.imag(), __c.real());
913 if (__libcpp_isinf_or_builtin(__c.real()))
914 return abs(__c.real());
917 return __c.real() * __c.real() + __c.imag() * __c.imag();
936 return complex<_Tp>(__c.real(), -__c.imag());
958 if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
1047 if (__libcpp_isinf_or_builtin(__x.real()))
1049 if (__x.real() > _Tp(0))
1050 …return complex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(…
1051 …Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), __x.imag()));
1063 if (__libcpp_isinf_or_builtin(__x.real()))
1065 if (__x.real() < _Tp(0))
1074 return complex<_Tp>(__x.real(), __i);
1077 else if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1079 _Tp __e = exp(__x.real());
1135 if (__libcpp_isinf_or_builtin(__x.real()))
1140 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1141 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1143 if (__libcpp_isnan_or_builtin(__x.real()))
1146 return complex<_Tp>(__x.imag(), __x.real());
1149 return complex<_Tp>(__x.real(), __x.real());
1152 return complex<_Tp>(copysign(__x.imag(), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1154 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1164 if (__libcpp_isinf_or_builtin(__x.real()))
1167 return complex<_Tp>(abs(__x.real()), __x.imag());
1170 if (__x.real() > 0)
1171 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
1173 return complex<_Tp>(-__x.real(), copysign(__pi * _Tp(0.75), __x.imag()));
1175 if (__x.real() < 0)
1176 return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
1177 return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
1179 if (__libcpp_isnan_or_builtin(__x.real()))
1182 return complex<_Tp>(abs(__x.imag()), __x.real());
1183 return complex<_Tp>(__x.real(), __x.real());
1188 return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
1200 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1204 if (__libcpp_isinf_or_builtin(__x.real()) || __x.real() == 0)
1205 return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
1208 if (__libcpp_isnan_or_builtin(__x.real()))
1210 return complex<_Tp>(__x.real(), __x.real());
1212 if (__libcpp_isinf_or_builtin(__x.real()))
1214 return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
1216 if (abs(__x.real()) == _Tp(1) && __x.imag() == _Tp(0))
1218 return complex<_Tp>(copysign(_Tp(INFINITY), __x.real()), copysign(_Tp(0), __x.imag()));
1221 return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
1230 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1231 return complex<_Tp>(__x.real(), _Tp(NAN));
1232 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1233 return complex<_Tp>(__x.real(), _Tp(NAN));
1234 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1236 return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
1245 if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
1246 return complex<_Tp>(abs(__x.real()), _Tp(NAN));
1247 if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
1248 return complex<_Tp>(_Tp(NAN), __x.real());
1249 if (__x.real() == 0 && __x.imag() == 0)
1251 if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
1252 return complex<_Tp>(abs(__x.real()), __x.imag());
1253 return complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), sinh(__x.real()) * sin(__x.imag()));
1262 if (__libcpp_isinf_or_builtin(__x.real()))
1268 if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
1270 _Tp __2r(_Tp(2) * __x.real());
1286 complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
1287 return complex<_Tp>(__z.imag(), -__z.real());
1297 if (__libcpp_isinf_or_builtin(__x.real()))
1300 return complex<_Tp>(__x.imag(), __x.real());
1303 if (__x.real() < _Tp(0))
1307 if (__x.real() < _Tp(0))
1308 return complex<_Tp>(__pi, signbit(__x.imag()) ? -__x.real() : __x.real());
1309 return complex<_Tp>(_Tp(0), signbit(__x.imag()) ? __x.real() : -__x.real());
1311 if (__libcpp_isnan_or_builtin(__x.real()))
1314 return complex<_Tp>(__x.real(), -__x.imag());
1315 return complex<_Tp>(__x.real(), __x.real());
1319 if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag())))
1323 return complex<_Tp>(abs(__z.imag()), abs(__z.real()));
1324 return complex<_Tp>(abs(__z.imag()), -abs(__z.real()));
1333 complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
1334 return complex<_Tp>(__z.imag(), -__z.real());
1343 complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
1344 return complex<_Tp>(__z.imag(), -__z.real());
1354 return cosh(complex<_Tp>(-__x.imag(), __x.real()));
1363 complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
1364 return complex<_Tp>(__z.imag(), -__z.real());
1437 __s << '(' << __x.real() << ',' << __x.imag() << ')';