conj、 、 conjfconjl

擷取複數的共軛複數。

語法

_Dcomplex conj(
   _Dcomplex z
);
_Fcomplex conj(
   _Fcomplex z
);  // C++ only
_Lcomplex conj(
   _Lcomplex z
);  // C++ only
_Fcomplex conjf(
   _Fcomplex z
);
_Lcomplex conjl(
   _Lcomplex z
);
#define conj(X) // Requires C11 or higher

參數

z
複數。

傳回值

z 的共軛複數。 結果的實數和虛數部分與 z 相同,但正負號相反。

備註

因為 C++ 允許多載,所以您可以呼叫採用並傳回 conj_Fcomplex 值的 _Lcomplex 的多載。 在 C 程式中,除非您使用 <tgmath.h> 巨集來呼叫此函式,否則一 conj 律會接受並傳 _Dcomplex 回值。

如果您使用 <tgmath.h>conj() 巨集,則引數的型別會決定選取哪一個函式版本。 如需詳細資料,請參閱型別泛型數學

需求

常式 C 標頭 C++ 標頭
conj、 、 conjfconjl <complex.h> <ccomplex>
conj 巨集 <tgmath.h>

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

另請參閱

依字母順序排列的函式參考
norm、 、 normfnorml
creal、 、 crealfcreall
cproj、 、 cprojfcprojl
cimag、 、 cimagfcimagl
carg、 、 cargfcargl
cabs、 、 cabsfcabsl