分享方式:


csqrt、 、 csqrtfcsqrtl

擷取複數的平方根,而且沿著負實數軸有一個分支切割。

語法

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

參數

z
複數。

傳回值

z 的平方根。 結果會在右半平面中。

輸入 SEH 例外狀況 _matherr 例外
± QNaN,IND none _DOMAIN
- INF none _DOMAIN

備註

因為 C++ 允許多載,所以您可以呼叫採用並傳回 csqrt_Fcomplex 值的 _Lcomplex 的多載。 在 C 程式中, csqrt 會一律採用及傳回 _Dcomplex

需求

常式 C 標頭 C++ 標頭
csqrt、 、 csqrtfcsqrtl <complex.h> <ccomplex>

如需相容性詳細資訊,請參閱相容性

另請參閱

依字母順序排列的函式參考
catanh、 、 catanhfcatanhl
ctanh、 、 ctanhfctanhl
catan、 、 catanfcatanl
csinh、 、 csinhfcsinhl
casinh、 、 casinhfcasinhl
ccosh、 、 ccoshfccoshl
cacosh、 、 cacoshfcacoshl
cacos、 、 cacosfcacosl
ctan、 、 ctanfctanl
csin、 、 csinfcsinl
casin、 、 casinfcasinl
ccos、 、 ccosfccosl