CSQRT(3) | Library Functions Manual | CSQRT(3) |

`csqrt`

, `csqrtf`

,
`csqrtl`

—
complex square root

`#include <complex.h>`

`double complex`

`csqrt`

(`double
complex z`);

`float complex`

`csqrtf`

(`float
complex z`);

`long double complex`

`csqrtl`

(`long
double complex z`);

`csqrt`

(), `csqrtf`

() and
`csqrtl`

() functions compute the complex square root of
If `z` = x + iy, then

Re csqrt(z) = [ (|z| + x) / 2 ]^(1/2). Im csqrt(z) = [ (|z| - x) / 2 ]^(1/2).

Note that -csqrt(z) is also a square root of
`z`. The root chosen is always in the right half plane
and Im csqrt(z) has the same sign as y.

`csqrt`

(), `csqrtf`

() and
`csqrtl`

() functions return the complex square root of
`csqrt`

(), `csqrtf`

() and
`csqrtl`

() functions conform to ISO/IEC
9899:1999 (“ISO C99”).
June 5, 2013 | OpenBSD-current |