csqrt, csqrtf, or csqrtl Subroutine

Purpose

Computes complex square roots.

Syntax

#include <complex.h>
double complex csqrt (z)
double complex z;

float complex csqrtf (z)
float complex z;

long double complex csqrtl (z)
long double complex z;

Description

The csqrt, csqrtf, and csqrtl subroutines compute the complex square root of the value specified by the z parameter, with a branch cut along the negative real axis.

Parameters

Item Description
z Specifies the value to be computed.

Return Values

The csqrt, csqrtf, and csqrtl subroutines return the complex square root value, in the range of the right half-plane (including the imaginary axis).