std::cosh(std::complex)
提供: cppreference.com
| ヘッダ <complex> で定義
|
||
| template< class T > complex<T> cosh( const complex<T>& z ); |
(C++11以上) | |
複素数の値 z の複素数の双曲線余弦を計算します。
目次 |
[編集] 引数
| z | - | 複素数の値 |
[編集] 戻り値
エラーが発生しなければ、 z の複素数の双曲線余弦が返されます。
[編集] エラー処理と特殊な値
Errors are reported consistent with math_errhandling
If the implementation supports IEEE floating-point arithmetic,
- std::cosh(std::conj(z)) == std::conj(std::cosh(z))
- std::cosh(z) == std::cosh(-z)
- If
zis(+0,+0), the result is(1,+0) - If
zis(+0,+∞), the result is(NaN,±0)(the sign of the imaginary part is unspecified) and FE_INVALID is raised - If
zis(+0,NaN), the result is(NaN,±0)(the sign of the imaginary part is unspecified) - If
zis(x,+∞)(for any finite non-zero x), the result is(NaN,NaN)and FE_INVALID is raised - If
zis(x,NaN)(for any finite non-zero x), the result is(NaN,NaN)and FE_INVALID may be raised - If
zis(+∞,+0), the result is(+∞,+0) - If
zis(+∞,y)(for any finite non-zero y), the result is+∞cis(y) - If
zis(+∞,+∞), the result is(±∞,NaN)(the sign of the real part is unspecified) and FE_INVALID is raised - If
zis(+∞,NaN), the result is(+∞,NaN) - If
zis(NaN,+0), the result is(NaN,±0)(the sign of the imaginary part is unspecified) - If
zis(NaN,+y)(for any finite non-zero y), the result is(NaN,NaN)and FE_INVALID may be raised - If
zis(NaN,NaN), the result is(NaN,NaN)
where cis(y) is cos(y) + i sin(y)
[編集] ノート
双曲線余弦の数学的な定義は cosh z =| ez +e-z |
| 2 |
双曲線余弦は複素平面上の整関数であり、分岐切断はありません。 双曲線余弦は虚部に関して 2πi の周期で周期的です。
[編集] 例
Run this code
#include <iostream> #include <cmath> #include <complex> int main() { std::cout << std::fixed; std::complex<double> z(1, 0); // behaves like real cosh along the real line std::cout << "cosh" << z << " = " << std::cosh(z) << " (cosh(1) = " << std::cosh(1) << ")\n"; std::complex<double> z2(0, 1); // behaves like real cosine along the imaginary line std::cout << "cosh" << z2 << " = " << std::cosh(z2) << " ( cos(1) = " << std::cos(1) << ")\n"; }
出力:
cosh(1.000000,0.000000) = (1.543081,0.000000) (cosh(1) = 1.543081) cosh(0.000000,1.000000) = (0.540302,0.000000) ( cos(1) = 0.540302)
[編集] 関連項目
| 複素数の双曲線正弦 (sh(z)) を計算します (関数テンプレート) | |
| 複素数の双曲線正接を計算します (関数テンプレート) | |
| (C++11) |
複素数の逆双曲線余弦を計算します (関数テンプレート) |
| (C++11)(C++11) |
双曲線余弦 (ch(x)) を計算します (関数) |
| valarray の各要素に関数 std::cosh を適用します (関数テンプレート) | |
| ccosh の C言語リファレンス
| |

