std::real(std::complex) (3) - Linux Man Pages

std::real(std::complex): std::real(std::complex)

NAME

std::real(std::complex) - std::real(std::complex)

Synopsis


Defined in header <complex>
template< class T > (until C++14)
T real( const std::complex<T>& z );
template< class T > (since C++14)
constexpr T real( const std::complex<T>& z );
float real( float z );
template< class DoubleOrInteger > (1) (since C++11)
double real( DoubleOrInteger z ); (until C++14)
long double real( long double z ); (2)
constexpr float real( float z );
template< class DoubleOrInteger > (since C++14)
constexpr double real( DoubleOrInteger z );
constexpr long double real( long double z );


1) Returns the real component of the complex number z, i.e. z.real().


2) Additional overloads are provided for float, double, long double, and all integer types, which are treated as complex numbers with zero imaginary component. (since C++11)

Parameters


z - complex value

Return value


the real component of z

See also


     accesses the real part of the complex number
real (public member function)
     returns the imaginary component
imag (function template)