csqrt, csqrtf, csqrtl

Visual Studio 2015
 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at csqrt, csqrtf, csqrtl.

Retrieves the square root of a complex number, with a branch cut along the negative real axis.

_Dcomplex csqrt(   
   _Dcomplex z   
);  
_Fcomplex csqrt(   
   _Fcomplex z   
);  // C++ only  
_Lcomplex csqrt(   
   _Lcomplex z   
);  // C++ only  
_Fcomplex csqrtf(   
   _Fcomplex z   
);  
_Lcomplex csqrtl(   
   _Lcomplex z   
);  

Parameters

z
A complex number.

The square root of z. The result is in the right half-plane.

InputSEH Exception_matherr Exception
± QNAN, INDnone_DOMAIN
- ∞none_DOMAIN

Because C++ allows overloading, you can call overloads of csqrt that take and return _Fcomplex and _Lcomplex values. In a C program, csqrt always takes and returns a _Dcomplex value.

RoutineC headerC++ header
csqrt, csqrtf, csqrtl<complex.h><ccomplex>

For more compatibility information, see Compatibility in the Introduction.

Alphabetical Function Reference
catanh, catanhf, catanhl
ctanh, ctanhf, ctanhl
catan, catanf, catanl
csinh, csinhf, csinhl
casinh, casinhf, casinhl
ccosh, ccoshf, ccoshl
cacosh, cacoshf, cacoshl
cacos, cacosf, cacosl
ctan, ctanf, ctanl
csin, csinf, csinl
casin, casinf, casinl
ccos, ccosf, ccosl

Show: