std::sin(std::complex)
提供: cppreference.com
ヘッダ <complex> で定義
|
||
template< class T > complex<T> sin( const complex<T>& z ); |
||
複素数の値 z
の複素正弦を計算します。
目次 |
[編集] 引数
z | - | 複素数の値 |
[編集] 戻り値
エラーが発生しなければ、 z
の複素正弦を返します。
エラーおよび特殊なケースは、この演算が -i * std::sinh(i*z)
によって実装されているかのように処理されます。 ただし i
は虚数単位です。
[編集] ノート
正弦は複素平面上の整関数であり、分岐切断はありません。
正弦の数学的な定義は sin z =eiz -e-iz |
2i |
[編集] 例
Run this code
#include <iostream> #include <cmath> #include <complex> int main() { std::cout << std::fixed; std::complex<double> z(1, 0); // behaves like real sine along the real line std::cout << "sin" << z << " = " << std::sin(z) << " ( sin(1) = " << std::sin(1) << ")\n"; std::complex<double> z2(0, 1); // behaves like sinh along the imaginary line std::cout << "sin" << z2 << " = " << std::sin(z2) << " (sinh(1) = " << std::sinh(1) << ")\n"; }
出力:
sin(1.000000,0.000000) = (0.841471,0.000000) ( sin(1) = 0.841471) sin(0.000000,1.000000) = (0.000000,1.175201) (sinh(1) = 1.175201)
[編集] 関連項目
複素数の余弦 (cos(z)) を計算します (関数テンプレート) | |
複素数の正接 (tan(z)) を計算します (関数テンプレート) | |
(C++11) |
複素数の逆正弦 (arcsin(z)) を計算します (関数テンプレート) |
(C++11)(C++11) |
正弦 (sin(x)) を計算します (関数) |
valarray の各要素に関数 std::sin を適用します (関数テンプレート) | |
csin の C言語リファレンス
|