.TH "std::complex< _Tp >" 3cxx "Sat Aug 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::complex< _Tp > .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef _Tp \fBvalue_type\fP" .br .RI "Value typedef\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "constexpr \fBcomplex\fP (const _Tp &__r=_Tp(), const _Tp &__i=_Tp())" .br .RI "Default constructor\&. First parameter is x, second parameter is y\&. Unspecified parameters default to 0\&. " .ti -1c .RI "constexpr \fBcomplex\fP (const \fBcomplex\fP &)=default" .br .ti -1c .RI "template constexpr \fBcomplex\fP (const \fBcomplex\fP< _Up > &__z)" .br .RI "Converting constructor\&. " .ti -1c .RI "constexpr \fBcomplex\fP \fB__rep\fP () const" .br .ti -1c .RI "constexpr _GLIBCXX_ABI_TAG_CXX11 _Tp \fBimag\fP () const" .br .ti -1c .RI "_GLIBCXX20_CONSTEXPR void \fBimag\fP (_Tp __val)" .br .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator*=\fP (const _Tp &)" .br .RI "Multiply this complex number by a scalar\&. " .ti -1c .RI "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator*=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Multiply this complex number by another\&. " .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator+=\fP (const _Tp &__t)" .br .RI "Add a scalar to this complex number\&. " .ti -1c .RI "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator+=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Add another complex number to this one\&. " .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator\-=\fP (const _Tp &__t)" .br .RI "Subtract a scalar from this complex number\&. " .ti -1c .RI "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator\-=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Subtract another complex number from this one\&. " .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator/=\fP (const _Tp &)" .br .RI "Divide this complex number by a scalar\&. " .ti -1c .RI "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator/=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Divide this complex number by another\&. " .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator=\fP (const _Tp &)" .br .RI "Assign a scalar to this complex number\&. " .ti -1c .RI "_GLIBCXX20_CONSTEXPR \fBcomplex\fP & \fBoperator=\fP (const \fBcomplex\fP &)=default" .br .ti -1c .RI "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP< _Tp > & \fBoperator=\fP (const \fBcomplex\fP< _Up > &)" .br .RI "Assign another complex number to this one\&. " .ti -1c .RI "constexpr _GLIBCXX_ABI_TAG_CXX11 _Tp \fBreal\fP () const" .br .ti -1c .RI "_GLIBCXX20_CONSTEXPR void \fBreal\fP (_Tp __val)" .br .in -1c .SH "Detailed Description" .PP .SS "template .br struct std::complex< _Tp >" Template to represent complex numbers\&. .PP Specializations for float, double, and long double are part of the library\&. Results with any other type are not guaranteed\&. .PP \fBParameters\fP .RS 4 \fITp\fP Type of real and imaginary values\&. .RE .PP .PP Definition at line 127 of file complex\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _Tp \fBstd::complex\fP< _Tp >::\fBvalue_type\fP" .PP Value typedef\&. .PP Definition at line 130 of file complex\&. .SH "Constructor & Destructor Documentation" .PP .SS "template constexpr \fBstd::complex\fP< _Tp >::\fBcomplex\fP (const _Tp & __r = \fC_Tp()\fP, const _Tp & __i = \fC_Tp()\fP)\fC [inline]\fP, \fC [constexpr]\fP" .PP Default constructor\&. First parameter is x, second parameter is y\&. Unspecified parameters default to 0\&. .PP Definition at line 134 of file complex\&. .SS "template template constexpr \fBstd::complex\fP< _Tp >::\fBcomplex\fP (const \fBcomplex\fP< _Up > & __z)\fC [inline]\fP, \fC [constexpr]\fP" .PP Converting constructor\&. .PP Definition at line 144 of file complex\&. .SH "Member Function Documentation" .PP .SS "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP<_Tp>& \fBstd::complex\fP< _Tp >::operator+= (const _Tp & __t)\fC [inline]\fP" .PP Add a scalar to this complex number\&. .PP Definition at line 189 of file complex\&. .SS "template _GLIBCXX20_CONSTEXPR \fBcomplex\fP<_Tp>& \fBstd::complex\fP< _Tp >::operator\-= (const _Tp & __t)\fC [inline]\fP" .PP Subtract a scalar from this complex number\&. .PP Definition at line 198 of file complex\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.