29
Numerics library
[numerics]
29.4
Complex numbers
[complex.numbers]
29.4.2
Header
<complex>
synopsis
[complex.syn]
🔗
namespace
std
{
//
[complex]
, class template
complex
template
<
class
T
>
class
complex;
//
[complex.
ops]
, operators
template
<
class
T
>
constexpr
complex
<
T
>
operator
+
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
+
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
+
(
const
T
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
-
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
-
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
-
(
const
T
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
*
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
*
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
*
(
const
T
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
/
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
/
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
/
(
const
T
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
+
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
operator
-
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
bool
operator
=
=
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
bool
operator
=
=
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T,
class
charT,
class
traits
>
basic_istream
<
charT, traits
>
&
operator
>
>
(
basic_istream
<
charT, traits
>
&
, complex
<
T
>
&
)
;
template
<
class
T,
class
charT,
class
traits
>
basic_ostream
<
charT, traits
>
&
operator
<
<
(
basic_ostream
<
charT, traits
>
&
,
const
complex
<
T
>
&
)
;
//
[complex.
value.
ops]
, values
template
<
class
T
>
constexpr
T real
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
T imag
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
T abs
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
T arg
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
T norm
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
conj
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
proj
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
polar
(
const
T
&
,
const
T
&
=
T
(
)
)
;
//
[complex.
transcendentals]
, transcendentals
template
<
class
T
>
constexpr
complex
<
T
>
acos
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
asin
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
atan
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
acosh
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
asinh
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
atanh
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
cos
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
cosh
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
exp
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
log
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
log10
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
pow
(
const
complex
<
T
>
&
,
const
T
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
pow
(
const
complex
<
T
>
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
pow
(
const
T
&
,
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
sin
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
sinh
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
sqrt
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
tan
(
const
complex
<
T
>
&
)
;
template
<
class
T
>
constexpr
complex
<
T
>
tanh
(
const
complex
<
T
>
&
)
;
//
[complex.
tuple]
, tuple interface
template
<
class
T
>
struct
tuple_size;
template
<
size_t I,
class
T
>
struct
tuple_element;
template
<
class
T
>
struct
tuple_size
<
complex
<
T
>
>
;
template
<
size_t I,
class
T
>
struct
tuple_element
<
I, complex
<
T
>
>
;
template
<
size_t I,
class
T
>
constexpr
T
&
get
(
complex
<
T
>
&
)
noexcept
;
template
<
size_t I,
class
T
>
constexpr
T
&
&
get
(
complex
<
T
>
&
&
)
noexcept
;
template
<
size_t I,
class
T
>
constexpr
const
T
&
get
(
const
complex
<
T
>
&
)
noexcept
;
template
<
size_t I,
class
T
>
constexpr
const
T
&
&
get
(
const
complex
<
T
>
&
&
)
noexcept
;
//
[complex.
literals]
, complex literals
inline
namespace
literals
{
inline
namespace
complex_literals
{
constexpr
complex
<
long
double
>
operator
""il
(
long
double
)
;
constexpr
complex
<
long
double
>
operator
""il
(
unsigned
long
long
)
;
constexpr
complex
<
double
>
operator
""i
(
long
double
)
;
constexpr
complex
<
double
>
operator
""i
(
unsigned
long
long
)
;
constexpr
complex
<
float
>
operator
""if
(
long
double
)
;
constexpr
complex
<
float
>
operator
""if
(
unsigned
long
long
)
;
}
}
}