csqrt, csqrtf, csqrtl

检索复数的平方根,沿负实轴进行分支切割。

语法

_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 _DOMAIN
- INF _DOMAIN

注解

由于 C++ 允许重载,因此你可以调用采用并返回 csqrt_Fcomplex 值的 _Lcomplex 重载。 在 C 程序中, csqrt 始终采用并返回 _Dcomplex 值。

要求

例程 C 标头 C++ 标头
csqrt, csqrtf, csqrtl <complex.h> <ccomplex>

有关兼容性的详细信息,请参阅 兼容性

另请参阅

按字母顺序显示的函数参考
catanhcatanhfcatanhl
ctanhctanhfctanhl
catancatanfcatanl
csinhcsinhfcsinhl
casinhcasinhfcasinhl
ccoshccoshfccoshl
cacoshcacoshfcacoshl
cacoscacosfcacosl
ctanctanfctanl
csincsinfcsinl
casincasinfcasinl
ccosccosfccosl