Inheritance diagram for complex:

Representation of the mathematical concept of complex numbers. This implementation is largely a superset of std::complex functionality, and wraps the C99 complex data types if present.
| T | The element value type, which shall satisfy the following requirements: 
 | 
| Public Types | |
| typedef T | value_type | 
| The element value type. | |
| Public Member Functions | |
| Constructors | |
| template<typename U> | |
| complex (const complex< U > &other) | |
| Constructs a complex number from the other complex. | |
| complex (const typename impl::complex_base< T >::data_type &data) | |
| Constructs a complex from raw data. | |
| complex (const T &re=T(), const T &im=T()) | |
| Constructs a complex from a real re and imaginary im. | |
| Computed Assignments | |
| You can also use a value of type T for rhs.  | |
| complex & | operator *= (const complex &rhs) | 
| Multiplies the complex by rhs, then assigns it. | |
| complex & | operator+= (const complex &rhs) | 
| Adds the complex to rhs, then assigns it. | |
| complex & | operator-= (const complex &rhs) | 
| Subtracts the complex to rhs, then assigns it. | |
| complex & | operator/= (const complex &rhs) | 
| Divides the complex by rhs, then assigns it. | |
| Assignments | |
| You can also use a value of type T for rhs.  | |
| complex & | operator= (const complex &rhs) | 
| Assigns rhs. | |
| Friends | |
| Values | |
| T | abs (const complex &lhs) | 
| Gets the magnitude of lhs. | |
| T | arg (const complex &lhs) | 
| Gets the phase angle of lhs. | |
| const complex | conj (const complex &lhs) | 
| Gets the complex conjugate of lhs. | |
| T | imag (const complex &lhs) | 
| Gets the imaginary part of lhs. | |
| T | norm (const complex &lhs) | 
| Gets the square magniture of lhs. | |
| T | real (const complex &lhs) | 
| Gets the real part of lhs. | |
| Transcendentals | |
| const complex | cos (const complex &lhs) | 
| Gets the complex cosine of lhs. | |
| const complex | cosh (const complex &lhs) | 
| Gets the complex hyperbolic cosine of lhs. | |
| const complex | exp (const complex &lhs) | 
| Gets the complex natural exponential of lhs. | |
| const complex | log (const complex &lhs) | 
| Gets the complex natural logarithm of lhs. | |
| const complex | log10 (const complex &lhs) | 
| Gets the complex common logarithm of lhs. | |
| const complex | pow (const T &lhs, const complex &rhs) | 
| Raises lhs to the complex power rhs. | |
| const complex | pow (const complex &lhs, const T &rhs) | 
| Raises lhs to the complex power rhs. | |
| const complex | pow (const complex &lhs, const complex &rhs) | 
| Raises lhs to the complex power rhs. | |
| const complex | pow (const complex &lhs, int rhs) | 
| Raises lhs to the complex power rhs. | |
| const complex | sin (const complex &lhs) | 
| Gets the complex sine of lhs. | |
| const complex | sinh (const complex &lhs) | 
| Gets the complex hyperbolic sine of lhs. | |
| const complex | sqrt (const complex &lhs) | 
| Gets the complex square root of lhs. | |
| const complex | tan (const complex &lhs) | 
| Gets the complex tangent of lhs. | |
| const complex | tanh (const complex &lhs) | 
| Gets the complex hyperbolic tangent of lhs. | |
| Related Functions | |
| (Note that these are not member functions.) | |
| std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const complex< T > &rhs) | 
| Inserts rhs into the output stream os. | |
| std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, complex< T > &rhs) | 
| Extracts rhs from the input stream is. | |
| const complex< T > | polar (const T &r, const T &ang) | 
| Constructs a complex with magnitude r and phase angle ang. | |