<complex>
template<class T> complex<T> sqrt (const complex<T>& x);
Return square root of complex
Returns the square root of x using the principal branch, whose cuts are along the negative real axis, as if computed by:
The value computed is the range of positive real numbers.
When x is a negative real number, log(x).imag() is positive.
This overloads cmath's sqrt function.
Parameters
- x
- Complex value.
Return value
The square root of x.
See also
pow | Return complex power (function template) |
log | Return natural logarithm of complex (function template) |
exp | Return exponential of complex (function template) |
|