cpp/numeric/complex/sqrt

Computes the square root of the complex number with a branch cut along the negative real axis.

Return value
If no errors occur, returns the square root of, in the range of the right half-plane, including the imaginary axis ($[0; +∞)$ along the real axis and $(−∞; +∞)$ along the imaginary axis).

Error handling and special values
Errors are reported consistent with math_errhandling.

If the implementation supports IEEE floating-point arithmetic,
 * The function is continuous onto the branch cut taking into account the sign of imaginary part
 * If is, the result is
 * If is, the result is  even if x is NaN
 * If is, the result is  (unless x is ±∞) and  fe_invalid may be raised
 * If is, the result is  for finite positive y
 * If is, the result is  for finite positive y
 * If is, the result is  (sign of imaginary part unspecified)
 * If is, the result is
 * If is, the result is  and fe_invalid may be raised
 * If is, the result is
 * If is, the result is