conjf, conj, conjl
提供: cppreference.com
ヘッダ <complex.h> で定義 | ||
(1) | (C99以上) | |
(2) | (C99以上) | |
(3) | (C99以上) | |
ヘッダ <tgmath.h> で定義 | ||
#define conj( z ) | (4) | (C99以上) |
4) 型総称マクロ。
z
が longdoublecomplex、 longdoubleimaginary または longdouble の場合は conjl
が呼ばれます。 z
が floatcomplex、 floatimaginary または float の場合は conjf
が呼ばれます。 z
が doublecomplex、 doubleimaginary、 double または任意の整数型の場合は conj
が呼ばれます。目次 |
[編集]引数
z | - | 複素数の引数 |
[編集]戻り値
z
の複素共役。
[編集]ノート
I を _Imaginary_I として実装しない C99 処理系では、負のゼロを虚部に持つ複素数を取得するために conj
が使用されることがあります。 C11 ではマクロ CMPLX がこの目的に使用されます。
[編集]例
Run this code
出力:
The conjugate of 1.0+2.0i is 1.0-2.0i Their product is 5.0+0.0i
[編集]参考文献
- C11 standard (ISO/IEC 9899:2011):
- 7.3.9.4 The conj functions (p: 198)
- 7.25 Type-generic math <tgmath.h> (p: 373-375)
- G.7 Type-generic math <tgmath.h> (p: 545)
- C99 standard (ISO/IEC 9899:1999):
- 7.3.9.3 The conj functions (p: 179)
- 7.22 Type-generic math <tgmath.h> (p: 335-337)
- G.7 Type-generic math <tgmath.h> (p: 480)
[編集]関連項目
conj の C++リファレンス |