csqrt(), csqrtf(), csqrtl() — Calculate the complex square root
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C99 |
both | z/OS V1R7 |
Format
##include <complex.h>
double complex csqrt(double complex z);
float complex csqrtf(float complex z);
long double complex csqrtl(long double complex z);
General description
The csqrt() family
of functions compute the complex square root of z,
with a branch cut along the negative real axis.
Note: The following
table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE
Binary Floating-Point.
Function | Hex | IEEE |
---|---|---|
csqrt | X | X |
csqrtf | X | X |
csqrtl | X | X |
Returned value
The csqrt() family of functions return the complex square root value, in the range of the right half-plane (including the imaginary axis).
Example
For an example of a similar function see cacos(), cexp() or cpow().