Namespaces
Variants
Views
Actions

std::complex

From cppreference.com
< cpp‎ | numeric
Revision as of 00:03, 3 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <complex>
</td>

<td></td> <td></td> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template< class T >
class complex; //not defined
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template<> class complex<float>;
</td>

<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template<> class complex<double>;
</td>

<td > (3) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template<> class complex<long double>;
</td>

<td > (4) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

The specializations std::complex<float>, std::complex<double>, and std::complex<long double> are literal types for representing and manipulating complex numbers.

The effect of instantiating the template complex for any other type is unspecified.

Contents

Member types

Member type Definition
value_type T

Member functions

Template:cpp/numeric/complex/dcl list operator=Template:cpp/numeric/complex/dcl list realTemplate:cpp/numeric/complex/dcl list imagTemplate:cpp/numeric/complex/dcl list operator arith
constructs a complex number
(public member function)

Non-member functions

Template:cpp/numeric/complex/dcl list operator arith2Template:cpp/numeric/complex/dcl list operator arith3Template:cpp/numeric/complex/dcl list operator cmpTemplate:cpp/numeric/complex/dcl list operator ltltgtgtTemplate:cpp/numeric/complex/dcl list real2Template:cpp/numeric/complex/dcl list imag2Template:cpp/numeric/complex/dcl list absTemplate:cpp/numeric/complex/dcl list argTemplate:cpp/numeric/complex/dcl list normTemplate:cpp/numeric/complex/dcl list conjTemplate:cpp/numeric/complex/dcl list projTemplate:cpp/numeric/complex/dcl list polarTemplate:cpp/numeric/complex/dcl list expTemplate:cpp/numeric/complex/dcl list logTemplate:cpp/numeric/complex/dcl list log10Template:cpp/numeric/complex/dcl list powTemplate:cpp/numeric/complex/dcl list sqrtTemplate:cpp/numeric/complex/dcl list sinTemplate:cpp/numeric/complex/dcl list cosTemplate:cpp/numeric/complex/dcl list tanTemplate:cpp/numeric/complex/dcl list asinTemplate:cpp/numeric/complex/dcl list acosTemplate:cpp/numeric/complex/dcl list atanTemplate:cpp/numeric/complex/dcl list sinhTemplate:cpp/numeric/complex/dcl list coshTemplate:cpp/numeric/complex/dcl list tanhTemplate:cpp/numeric/complex/dcl list asinhTemplate:cpp/numeric/complex/dcl list acoshTemplate:cpp/numeric/complex/dcl list atanh
Exponential functions
Power functions
Trigonometric functions
Hyperbolic functions