Namespaces
Variants
Views
Actions

std::sqrt(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 23:16, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Defined in header <complex>
template< class T >
complex<T> sqrt( const complex<T>& x );

Computes the square root of the complex number x.

The branch cuts are along the negative real axis. sqrt computes the square root in the range of the right half-plane. If x is a negative real number, the return value will lie on the positive imaginary axis.

[edit] Parameters

x - complex number to take the square root of

[edit] Return value

the square root of x.

[edit] See also

complex power, one or both arguments may be a complex number
(function template) [edit]