名前空間
変種
操作

csinf, csin, csinl

提供: cppreference.com
< c‎ | numeric‎ | complex
ヘッダ <complex.h> で定義
float complex       csinf( float complex z );
(1) (C99以上)
double complex      csin( double complex z );
(2) (C99以上)
long double complex csinl( long double complex z );
(3) (C99以上)
ヘッダ <tgmath.h> で定義
#define sin( z )
(4) (C99以上)
1-3) z の複素正弦を計算します。
4) 型総称マクロ。 zlong double complex 型の場合は csinl が呼ばれ、 zdouble complex 型の場合は csin が呼ばれ、 zfloat complex 型の場合は csinf が呼ばれます。 z が実数または整数の場合、このマクロは対応する実数の関数 (sinfsinsinl) を呼びます。 z が虚数の場合、このマクロは関数 sinh の対応する実数版を呼んで公式 sin(iy) = i sinh(y) を実装し、このマクロの戻り値型は虚数になります。

目次

[編集] 引数

z - 複素数の引数

[編集] 戻り値

エラーが発生しなければ、 z の複素正弦。

エラーおよび特殊なケースは、この演算が -I * csinh(I*z) によって実装されているかのように処理されます。

[編集] ノート

正弦は複素平面上の整関数であり、分岐切断を持ちません。

正弦の数学的な定義は sin z =
eiz
-e-iz
2i
です。

[編集]

#include <stdio.h>
#include <math.h>
#include <complex.h>
 
int main(void)
{
    double complex z = csin(1);  // behaves like real sine along the real line
    printf("sin(1+0i) = %f%+fi ( sin(1)=%f)\n", creal(z), cimag(z), sin(1));
 
    double complex z2 = csin(I); // behaves like sinh along the imaginary line 
    printf("sin(0+1i) = %f%+fi (sinh(1)=%f)\n", creal(z2), cimag(z2), sinh(1));
}

出力:

sin(1+0i) = 0.841471+0.000000i ( sin(1)=0.841471)
sin(0+1i) = 0.000000+1.175201i (sinh(1)=1.175201)

[編集] 参考文献

  • C11 standard (ISO/IEC 9899:2011):
  • 7.3.5.5 The csin functions (p: 191-192)
  • 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.5.5 The csin functions (p: 173)
  • 7.22 Type-generic math <tgmath.h> (p: 335-337)
  • G.7 Type-generic math <tgmath.h> (p: 480)

[編集] 関連項目

(C99)(C99)(C99)
複素余弦を計算します
(関数) [edit]
(C99)(C99)(C99)
複素正接を計算します
(関数) [edit]
(C99)(C99)(C99)
複素数の逆正弦を計算します
(関数) [edit]
(C99)(C99)
正弦 (sin(x)) を計算します
(関数) [edit]