Everything

csqrtf / csqrt / csqrtl


Calculates the square root of a complex number.

[Format]

#include <complex.h>

float complex csqrtf(float complex z);

double complex csqrt(double complex z);

long double complex csqrtl(long double complex z);

[Parameters]

z Complex number for which the square root is to be computed

[Return values]

Normal: Complex square root of z

Abnormal: Domain error: Returns not-a-number.

[Remarks]

A domain error occurs if z is negative.

The branch cut for the csqrt function group is along the negative real axis.

The range of the return value from the csqrt function group is the right halfplane including the imaginary axis.