function template
<complex>

std::sqrt

template<class T> complex<T> sqrt (const complex<T>& x);
Square root of complex
Returns the square root of x using the principal branch, whose cuts are along the negative real axis.

This is the complex version of the sqrt function (defined in <cmath>).

Parameters

x
Complex value.

Return value

Square root of x.

See also