Complex Numbers
Numerics
Collaboration diagram for Complex Numbers:

## Classes

struct | std::complex< _Tp >
struct | std::complex< double >
struct | std::complex< float >
struct | std::complex< long double >

## Macros

#define | __cpp_lib_complex_udls

## Typedefs

typedef std::complex< typename __promote_2< _Tp, _Up >::__type > | __gnu_cxx::__promote_2< std::complex< _Tp >, _Up >::__type
typedef std::complex< typename __promote_2< _Tp, _Up >::__type > | __gnu_cxx::__promote_2< _Tp, std::complex< _Up > >::__type
typedef std::complex< typename __promote_2< _Tp, _Up >::__type > | __gnu_cxx::__promote_2< std::complex< _Tp >, std::complex< _Up > >::__type
typedef __complex__ float | std::complex< float >::_ComplexT
typedef __complex__ double | std::complex< double >::_ComplexT
typedef __complex__ long double | std::complex< long double >::_ComplexT
typedef _Tp | std::complex< _Tp >::value_type
typedef float | std::complex< float >::value_type
typedef double | std::complex< double >::value_type
typedef long double | std::complex< long double >::value_type

## Functions

constexpr | std::complex< float >::complex (_ComplexT __z)
constexpr | std::complex< double >::complex (_ComplexT __z)
constexpr | std::complex< long double >::complex (_ComplexT __z)
constexpr | std::complex< _Tp >::complex (const _Tp &__r=_Tp(), const _Tp &__i=_Tp())
constexpr | std::complex< _Tp >::complex (const complex &)=default
template<typename _Up >
constexpr | std::complex< _Tp >::complex (const complex< _Up > &__z)
constexpr | std::complex< float >::complex (const complex< double > &)
constexpr | std::complex< long double >::complex (const complex< double > &__z)
constexpr | std::complex< double >::complex (const complex< float > &__z)
constexpr | std::complex< long double >::complex (const complex< float > &__z)
constexpr | std::complex< float >::complex (const complex< long double > &)
constexpr | std::complex< double >::complex (const complex< long double > &)
constexpr | std::complex< double >::complex (double __r=0.0, double __i=0.0)
constexpr | std::complex< float >::complex (float __r=0.0f, float __i=0.0f)
constexpr | std::complex< long double >::complex (long double __r=0.0L, long double __i=0.0L)
| std::complex< double >::__attribute ((__abi_tag__("cxx11"))) const expr double real() const
| std::complex< float >::__attribute ((__abi_tag__("cxx11"))) const expr float real() const
| std::complex< long double >::__attribute ((__abi_tag__("cxx11"))) const expr long double real() const
template<typename _Tp >
_Tp | std::__complex_abs (const complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_acos (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_acosh (const std::complex< _Tp > &__z)
template<typename _Tp >
_Tp | std::__complex_arg (const complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_asin (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_asinh (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_atan (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::__complex_atanh (const std::complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_cos (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_cosh (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_exp (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_log (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_pow (const complex< _Tp > &__x, const complex< _Tp > &__y)
template<typename _Tp >
complex< _Tp > | std::__complex_pow_unsigned (complex< _Tp > __x, unsigned __n)
template<typename _Tp >
std::complex< _Tp > | std::__complex_proj (const std::complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_sin (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_sinh (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_sqrt (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_tan (const complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::__complex_tanh (const complex< _Tp > &__z)
constexpr complex | std::complex< _Tp >::__rep () const
constexpr _ComplexT | std::complex< float >::__rep () const
constexpr _ComplexT | std::complex< double >::__rep () const
constexpr _ComplexT | std::complex< long double >::__rep () const
template<typename _Tp >
static _Tp | std::_Norm_helper< bool >::_S_do_it (const complex< _Tp > &__z)
template<typename _Tp >
static _Tp | std::_Norm_helper< true >::_S_do_it (const complex< _Tp > &__z)
template<typename _Tp >
_Tp | std::abs (const complex< _Tp > &)
template<typename _Tp >
std::complex< _Tp > | std::acos (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::acosh (const std::complex< _Tp > &__z)
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type | std::arg (_Tp __x)
template<typename _Tp >
_Tp | std::arg (const complex< _Tp > &)
template<typename _Tp >
std::complex< _Tp > | std::asin (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::asinh (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::atan (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< _Tp > | std::atanh (const std::complex< _Tp > &__z)
template<typename _Tp >
std::complex< typename __gnu_cxx::__promote< _Tp >::__type > | std::tr1::conj (_Tp __x)
template<typename _Tp >
std::complex< typename __gnu_cxx::__promote< _Tp >::__type > | std::conj (_Tp __x)
template<typename _Tp >
complex< _Tp > | std::conj (const complex< _Tp > &)
template<typename _Tp >
std::complex< _Tp > | std::tr1::conj (const std::complex< _Tp > &__z)
template<typename _Tp >
complex< _Tp > | std::cos (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::cosh (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::exp (const complex< _Tp > &)
template<typename _Tp >
std::complex< _Tp > | std::tr1::fabs (const std::complex< _Tp > &__z)
template<typename _Tp >
_Tp | std::fabs (const std::complex< _Tp > &__z)
constexpr _GLIBCXX_ABI_TAG_CXX11 _Tp | std::complex< _Tp >::imag () const
void | std::complex< _Tp >::imag (_Tp __val)
template<typename _Tp >
constexpr __gnu_cxx::__promote< _Tp >::__type | std::imag (_Tp)
template<typename _Tp >
constexpr _Tp | std::imag (const complex< _Tp > &__z)
void | std::complex< double >::imag (double __val)
void | std::complex< float >::imag (float __val)
void | std::complex< long double >::imag (long double __val)
template<typename _Tp >
complex< _Tp > | std::log (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::log10 (const complex< _Tp > &)
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type | std::norm (_Tp __x)
template<typename _Tp >
_Tp | std::norm (const complex< _Tp > &)
template<typename _Tp >
constexpr bool | std::operator!= (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
constexpr bool | std::operator!= (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
constexpr bool | std::operator!= (const complex< _Tp > &__x, const complex< _Tp > &__y)
constexpr std::complex< double > | std::literals::operator""i (long double __num)
constexpr std::complex< double > | std::literals::operator""i (unsigned long long __num)
constexpr std::complex< float > | std::literals::operator""if (long double __num)
constexpr std::complex< float > | std::literals::operator""if (unsigned long long __num)
constexpr std::complex< long double > | std::literals::operator""il (long double __num)
constexpr std::complex< long double > | std::literals::operator""il (unsigned long long __num)
template<typename _Tp >
complex< _Tp > | std::operator* (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
complex< _Tp > | std::operator* (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
complex< _Tp > | std::operator* (const complex< _Tp > &__x, const complex< _Tp > &__y)
complex< _Tp > & | std::complex< _Tp >::operator*= (const _Tp &)
template<class _Tp >
complex & | std::complex< float >::operator*= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< double >::operator*= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< long double >::operator*= (const complex< _Tp > &__z)
template<typename _Up >
complex< _Tp > & | std::complex< _Tp >::operator*= (const complex< _Up > &)
complex & | std::complex< double >::operator*= (double __d)
complex & | std::complex< float >::operator*= (float __f)
complex & | std::complex< long double >::operator*= (long double __r)
template<typename _Tp >
complex< _Tp > | std::operator+ (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
complex< _Tp > | std::operator+ (const complex< _Tp > &__x)
template<typename _Tp >
complex< _Tp > | std::operator+ (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
complex< _Tp > | std::operator+ (const complex< _Tp > &__x, const complex< _Tp > &__y)
complex< _Tp > & | std::complex< _Tp >::operator+= (const _Tp &__t)
template<typename _Tp >
complex & | std::complex< float >::operator+= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< double >::operator+= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< long double >::operator+= (const complex< _Tp > &__z)
template<typename _Up >
complex< _Tp > & | std::complex< _Tp >::operator+= (const complex< _Up > &)
complex & | std::complex< double >::operator+= (double __d)
complex & | std::complex< float >::operator+= (float __f)
complex & | std::complex< long double >::operator+= (long double __r)
template<typename _Tp >
complex< _Tp > | std::operator- (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
complex< _Tp > | std::operator- (const complex< _Tp > &__x)
template<typename _Tp >
complex< _Tp > | std::operator- (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
complex< _Tp > | std::operator- (const complex< _Tp > &__x, const complex< _Tp > &__y)
complex< _Tp > & | std::complex< _Tp >::operator-= (const _Tp &__t)
template<class _Tp >
complex & | std::complex< float >::operator-= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< double >::operator-= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< long double >::operator-= (const complex< _Tp > &__z)
template<typename _Up >
complex< _Tp > & | std::complex< _Tp >::operator-= (const complex< _Up > &)
complex & | std::complex< double >::operator-= (double __d)
complex & | std::complex< float >::operator-= (float __f)
complex & | std::complex< long double >::operator-= (long double __r)
template<typename _Tp >
complex< _Tp > | std::operator/ (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
complex< _Tp > | std::operator/ (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
complex< _Tp > | std::operator/ (const complex< _Tp > &__x, const complex< _Tp > &__y)
complex< _Tp > & | std::complex< _Tp >::operator/= (const _Tp &)
template<class _Tp >
complex & | std::complex< float >::operator/= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< double >::operator/= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< long double >::operator/= (const complex< _Tp > &__z)
template<typename _Up >
complex< _Tp > & | std::complex< _Tp >::operator/= (const complex< _Up > &)
complex & | std::complex< double >::operator/= (double __d)
complex & | std::complex< float >::operator/= (float __f)
complex & | std::complex< long double >::operator/= (long double __r)
template<typename _Tp , typename _CharT , class _Traits >
basic_ostream< _CharT, _Traits > & | std::operator<< (basic_ostream< _CharT, _Traits > &__os, const complex< _Tp > &__x)
complex< _Tp > & | std::complex< _Tp >::operator= (const _Tp &)
complex & | std::complex< _Tp >::operator= (const complex &)=default
template<typename _Tp >
complex & | std::complex< float >::operator= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< double >::operator= (const complex< _Tp > &__z)
template<typename _Tp >
complex & | std::complex< long double >::operator= (const complex< _Tp > &__z)
template<typename _Up >
complex< _Tp > & | std::complex< _Tp >::operator= (const complex< _Up > &)
complex & | std::complex< double >::operator= (double __d)
complex & | std::complex< float >::operator= (float __f)
complex & | std::complex< long double >::operator= (long double __r)
template<typename _Tp >
constexpr bool | std::operator== (const _Tp &__x, const complex< _Tp > &__y)
template<typename _Tp >
constexpr bool | std::operator== (const complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp >
constexpr bool | std::operator== (const complex< _Tp > &__x, const complex< _Tp > &__y)
template<typename _Tp , typename _CharT , class _Traits >
basic_istream< _CharT, _Traits > & | std::operator>> (basic_istream< _CharT, _Traits > &__is, complex< _Tp > &__x)
template<typename _Tp >
complex< _Tp > | std::polar (const _Tp &, const _Tp &=0)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::tr1::polar (const _Tp &__rho, const _Up &__theta)
template<typename _Tp >
complex< _Tp > | std::pow (const _Tp &, const complex< _Tp > &)
template<typename _Tp >
std::complex< _Tp > | std::tr1::pow (const _Tp &__x, const std::complex< _Tp > &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::tr1::pow (const _Tp &__x, const std::complex< _Up > &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::pow (const _Tp &__x, const std::complex< _Up > &__y)
template<typename _Tp >
complex< _Tp > | std::pow (const complex< _Tp > &, const _Tp &)
template<typename _Tp >
complex< _Tp > | std::pow (const complex< _Tp > &, const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::pow (const complex< _Tp > &, int)
template<typename _Tp >
std::complex< _Tp > | std::tr1::pow (const std::complex< _Tp > &__x, const _Tp &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::tr1::pow (const std::complex< _Tp > &__x, const _Up &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::pow (const std::complex< _Tp > &__x, const _Up &__y)
template<typename _Tp >
std::complex< _Tp > | std::tr1::pow (const std::complex< _Tp > &__x, const std::complex< _Tp > &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::tr1::pow (const std::complex< _Tp > &__x, const std::complex< _Up > &__y)
template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > | std::pow (const std::complex< _Tp > &__x, const std::complex< _Up > &__y)
template<typename _Tp >
std::complex< typename __gnu_cxx::__promote< _Tp >::__type > | std::proj (_Tp __x)
template<typename _Tp >
std::complex< _Tp > | std::proj (const std::complex< _Tp > &)
constexpr _GLIBCXX_ABI_TAG_CXX11 _Tp | std::complex< _Tp >::real () const
void | std::complex< _Tp >::real (_Tp __val)
template<typename _Tp >
constexpr __gnu_cxx::__promote< _Tp >::__type | std::real (_Tp __x)
template<typename _Tp >
constexpr _Tp | std::real (const complex< _Tp > &__z)
void | std::complex< double >::real (double __val)
void | std::complex< float >::real (float __val)
void | std::complex< long double >::real (long double __val)
template<typename _Tp >
complex< _Tp > | std::sin (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::sinh (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::sqrt (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::tan (const complex< _Tp > &)
template<typename _Tp >
complex< _Tp > | std::tanh (const complex< _Tp > &)

## Detailed Description

Classes and functions for complex numbers.

## Typedef Documentation

## value_type

template<typename _Tp >

typedef _Tp std::complex< _Tp >::value_type

Value typedef.

Definition at line 125 of file complex.

## Function Documentation

## complex() [1/2]

template<typename _Tp >

constexpr std::complex< _Tp >::complex | ( | const _Tp & | __r = `_Tp()`,
|  | const _Tp & | __i = `_Tp()`
| ) |  |

inline constexpr

Default constructor. First parameter is x, second parameter is y. Unspecified parameters default to 0.

Definition at line 129 of file complex.

## complex() [2/2]

template<typename _Tp >
template<typename _Up >

constexpr std::complex< _Tp >::complex | ( | const complex< _Up > & | __z | ) |

inline constexpr

Converting constructor.

Definition at line 139 of file complex.

## abs()

template<typename _Tp >

_Tp std::abs | ( | const complex< _Tp > & | __z | ) |

inline

Return magnitude of z.

Definition at line 603 of file complex.

Referenced by std::binomial_distribution< _IntType >::operator()(), and std::poisson_distribution< _IntType >::operator()().

## acos()

template<typename _Tp >

std::complex< _Tp > std::acos | ( | const std::complex< _Tp > & | __z | ) |

inline

acos(__z) [8.1.2].

Definition at line 1619 of file complex.

## acosh()

template<typename _Tp >

std::complex< _Tp > std::acosh | ( | const std::complex< _Tp > & | __z | ) |

inline

acosh(__z) [8.1.5].

Definition at line 1735 of file complex.

## arg() [1/2]

template<typename _Tp >

__gnu_cxx::__promote<_Tp>::__type std::arg | ( | _Tp | __x | ) |

inline

Additional overloads [8.1.9].

Definition at line 1833 of file complex.

## arg() [2/2]

template<typename _Tp >

_Tp std::arg | ( | const complex< _Tp > & | __z | ) |

inline

Return phase angle of z.

Definition at line 630 of file complex.

## asin()

template<typename _Tp >

std::complex< _Tp > std::asin | ( | const std::complex< _Tp > & | __z | ) |

inline

asin(__z) [8.1.3].

Definition at line 1655 of file complex.

## asinh()

template<typename _Tp >

std::complex< _Tp > std::asinh | ( | const std::complex< _Tp > & | __z | ) |

inline

asinh(__z) [8.1.6].

Definition at line 1774 of file complex.

## atan()

template<typename _Tp >

std::complex< _Tp > std::atan | ( | const std::complex< _Tp > & | __z | ) |

inline

atan(__z) [8.1.4].

Definition at line 1699 of file complex.

## atanh()

template<typename _Tp >

std::complex< _Tp > std::atanh | ( | const std::complex< _Tp > & | __z | ) |

inline

atanh(__z) [8.1.7].

Definition at line 1818 of file complex.

## conj()

template<typename _Tp >

complex< _Tp > std::conj | ( | const complex< _Tp > & | __z | ) |

inline

Return complex conjugate of z.

Definition at line 679 of file complex.

## cos()

template<typename _Tp >

complex< _Tp > std::cos | ( | const complex< _Tp > & | __z | ) |

inline

Return complex cosine of z.

Definition at line 711 of file complex.

## cosh()

template<typename _Tp >

complex< _Tp > std::cosh | ( | const complex< _Tp > & | __z | ) |

inline

Return complex hyperbolic cosine of z.

Definition at line 741 of file complex.

## exp()

template<typename _Tp >

complex< _Tp > std::exp | ( | const complex< _Tp > & | __z | ) |

inline

Return complex base e exponential of z.

Definition at line 767 of file complex.

## fabs() [1/2]

template<typename _Tp >

std::complex< _Tp > std::tr1::fabs | ( | const std::complex< _Tp > & | __z | ) |

inline

fabs(__z) [8.1.8].

Definition at line 309 of file tr1/complex.

## fabs() [2/2]

template<typename _Tp >

_Tp std::fabs | ( | const std::complex< _Tp > & | __z | ) |

inline

fabs(__z) [8.1.8].

Definition at line 1827 of file complex.

## log()

template<typename _Tp >

complex< _Tp > std::log | ( | const complex< _Tp > & | __z | ) |

inline

Return complex natural logarithm of z.

Definition at line 794 of file complex.

Referenced by std::generate_canonical(), std::normal_distribution< result_type >::operator()(), std::gamma_distribution< result_type >::operator()(), std::binomial_distribution< _IntType >::operator()(), and std::poisson_distribution< _IntType >::operator()().

## log10()

template<typename _Tp >

complex< _Tp > std::log10 | ( | const complex< _Tp > & | __z | ) |

inline

Return complex base 10 logarithm of z.

Definition at line 799 of file complex.

## norm()

template<typename _Tp >

_Tp std::norm | ( | const complex< _Tp > & | __z | ) |

inline

Return z magnitude squared.

Definition at line 663 of file complex.

## operator!=()

template<typename _Tp >

constexpr bool std::operator!= | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline constexpr

Return false if x is equal to y.

Definition at line 476 of file complex.

## operator*()

template<typename _Tp >

complex<_Tp> std::operator* | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return new complex value x times y.

Definition at line 386 of file complex.

## operator*=() [1/2]

template<typename _Tp >

complex< _Tp > & std::complex< _Tp >::operator*= | ( | const _Tp & | __t | ) |

Multiply this complex number by a scalar.

Definition at line 245 of file complex.

## operator*=() [2/2]

template<typename _Tp >
template<typename _Up >

complex< _Tp > & std::complex< _Tp >::operator*= | ( | const complex< _Up > & | __z | ) |

Multiply this complex number by another.

Definition at line 299 of file complex.

## operator+() [1/2]

template<typename _Tp >

complex<_Tp> std::operator+ | ( | const complex< _Tp > & | __x | ) |

inline

Return x.

Definition at line 445 of file complex.

## operator+() [2/2]

template<typename _Tp >

complex<_Tp> std::operator+ | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return new complex value x plus y.

Definition at line 326 of file complex.

## operator+=() [1/2]

template<typename _Tp >

complex<_Tp>& std::complex< _Tp >::operator+= | ( | const _Tp & | __t | ) |

inline

Add a scalar to this complex number.

Definition at line 184 of file complex.

## operator+=() [2/2]

template<typename _Tp >
template<typename _Up >

complex< _Tp > & std::complex< _Tp >::operator+= | ( | const complex< _Up > & | __z | ) |

Add another complex number to this one.

Definition at line 276 of file complex.

## operator-() [1/2]

template<typename _Tp >

complex<_Tp> std::operator- | ( | const complex< _Tp > & | __x | ) |

inline

Return complex negation of x.

Definition at line 451 of file complex.

## operator-() [2/2]

template<typename _Tp >

complex<_Tp> std::operator- | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return new complex value x minus y.

Definition at line 356 of file complex.

## operator-=() [1/2]

template<typename _Tp >

complex<_Tp>& std::complex< _Tp >::operator-= | ( | const _Tp & | __t | ) |

inline

Subtract a scalar from this complex number.

Definition at line 193 of file complex.

## operator-=() [2/2]

template<typename _Tp >
template<typename _Up >

complex< _Tp > & std::complex< _Tp >::operator-= | ( | const complex< _Up > & | __z | ) |

Subtract another complex number from this one.

Definition at line 287 of file complex.

## operator/()

template<typename _Tp >

complex<_Tp> std::operator/ | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return new complex value x divided by y.

Definition at line 416 of file complex.

## operator/=() [1/2]

template<typename _Tp >

complex< _Tp > & std::complex< _Tp >::operator/= | ( | const _Tp & | __t | ) |

Divide this complex number by a scalar.

Definition at line 255 of file complex.

## operator/=() [2/2]

template<typename _Tp >
template<typename _Up >

complex< _Tp > & std::complex< _Tp >::operator/= | ( | const complex< _Up > & | __z | ) |

Divide this complex number by another.

Definition at line 312 of file complex.

## operator<<()

template<typename _Tp , typename _CharT , class _Traits >

basic_ostream<_CharT, _Traits>& std::operator<< | ( | basic_ostream< _CharT, _Traits > & | __os,
|  | const complex< _Tp > & | __x
| ) |  |

Insertion operator for complex values.

Definition at line 528 of file complex.

## operator=() [1/2]

template<typename _Tp >

complex< _Tp > & std::complex< _Tp >::operator= | ( | const _Tp & | __t | ) |

Assign a scalar to this complex number.

Definition at line 235 of file complex.

## operator=() [2/2]

template<typename _Tp >
template<typename _Up >

complex< _Tp > & std::complex< _Tp >::operator= | ( | const complex< _Up > & | __z | ) |

Assign another complex number to this one.

Definition at line 265 of file complex.

## operator==()

template<typename _Tp >

constexpr bool std::operator== | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline constexpr

Return true if x is equal to y.

Definition at line 458 of file complex.

## operator>>()

template<typename _Tp , typename _CharT , class _Traits >

basic_istream<_CharT, _Traits>& std::operator>> | ( | basic_istream< _CharT, _Traits > & | __is,
|  | complex< _Tp > & | __x
| ) |  |

Extraction operator for complex values.

Definition at line 493 of file complex.

## polar()

template<typename _Tp >

complex< _Tp > std::polar | ( | const _Tp & | __rho,
|  | const _Tp & | __theta = `0`
| ) |  |

inline

Return complex with magnitude rho and angle theta.

Definition at line 671 of file complex.

## pow() [1/5]

template<typename _Tp >

complex< _Tp > std::pow | ( | const _Tp & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return x to the y'th power.

Definition at line 1043 of file complex.

## pow() [2/5]

template<typename _Tp >

complex< _Tp > std::pow | ( | const complex< _Tp > & | __x,
|  | const _Tp & | __y
| ) |  |

Return x to the y'th power.

Definition at line 998 of file complex.

## pow() [3/5]

template<typename _Tp >

complex< _Tp > std::pow | ( | const complex< _Tp > & | __x,
|  | const complex< _Tp > & | __y
| ) |  |

inline

Return x to the y'th power.

Definition at line 1037 of file complex.

## pow() [4/5]

template<typename _Tp >

complex< _Tp > std::pow | ( | const complex< _Tp > & | __z,
|  | int | __n
| ) |  |

inline

Return x to the y'th power.

Definition at line 989 of file complex.

Referenced by std::gamma_distribution< result_type >::operator()().

## pow() [5/5]

template<typename _Tp , typename _Up >

std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type> std::tr1::pow | ( | const std::complex< _Tp > & | __x,
|  | const _Up & | __y
| ) |  |

inline

Additional overloads [8.1.9].

Definition at line 350 of file tr1/complex.

## sin()

template<typename _Tp >

complex< _Tp > std::sin | ( | const complex< _Tp > & | __z | ) |

inline

Return complex sine of z.

Definition at line 829 of file complex.

## sinh()

template<typename _Tp >

complex< _Tp > std::sinh | ( | const complex< _Tp > & | __z | ) |

inline

Return complex hyperbolic sine of z.

Definition at line 859 of file complex.

## sqrt()

template<typename _Tp >

complex< _Tp > std::sqrt | ( | const complex< _Tp > & | __z | ) |

inline

Return complex square root of z.

Definition at line 903 of file complex.

Referenced by std::normal_distribution< result_type >::operator()(), and std::student_t_distribution< _RealType >::operator()().

## tan()

template<typename _Tp >

complex< _Tp > std::tan | ( | const complex< _Tp > & | __z | ) |

inline

Return complex tangent of z.

Definition at line 930 of file complex.

## tanh()

template<typename _Tp >

complex< _Tp > std::tanh | ( | const complex< _Tp > & | __z | ) |

inline

Return complex hyperbolic tangent of z.

Definition at line 958 of file complex.