Namespaces
Variants
Actions

csqrtf, csqrt, csqrtl

From cppreference.com
< c‎ | numeric‎ | complex
Defined in header <complex.h>
float complex       csqrtf( float complex z );
(1) (since C99)
double complex      csqrt( double complex z );
(2) (since C99)
long double complex csqrtl( long double complex z );
(3) (since C99)
Defined in header <tgmath.h>
#define sqrt( z )
(4) (since C99)
1-3) Computes the complex square root of z with branch cut along the negative real axis.
4) Type-generic macro: If z has type long double complex, csqrtl is called. if z has type double complex, csqrt is called, if z has type float complex, csqrtf is called. If z is real or integer, then the macro invokes the corresponding real function (sqrtf, sqrt, sqrtl). If z is imaginary, the corresponding complex number version is called.

Contents