std::exp(std::complex)
提供: cppreference.com
| ヘッダ <complex> で定義
|
||
| template< class T > complex<T> exp( const complex<T>& z ); |
||
e を底とする z の指数、すなわち e の z 乗を計算します (e はネイピア数 2.7182818 です)。
目次 |
[編集] 引数
| z | - | 複素数の値 |
[編集] 戻り値
エラーが発生しなければ、 e の z 乗、 ez
が返されます。
[編集] エラー処理および特殊な値
Errors are reported consistent with math_errhandling
If the implementation supports IEEE floating-point arithmetic,
- std::exp(std::conj(z)) == std::conj(std::exp(z))
- If
zis(±0,+0), the result is(1,+0) - If
zis(x,+∞)(for any finite x), the result is(NaN,NaN)and FE_INVALID is raised. - If
zis(x,NaN)(for any finite 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 y), the result is+0cis(y) - If
zis(+∞,y)(for any finite nonzero y), the result is+∞cis(y) - If
zis(-∞,+∞), the result is(±0,±0)(signs are unspecified) - If
zis(+∞,+∞), the result is(±∞,NaN)and FE_INVALID is raised (the sign of the real part is unspecified) - If
zis(-∞,NaN), the result is(±0,±0)(signs are unspecified) - If
zis(+∞,NaN), the result is(±∞,NaN)(the sign of the real part is unspecified) - If
zis(NaN,+0), the result is(NaN,+0) - If
zis(NaN,y)(for any nonzero 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)
[編集] ノート
z = x+iy に対する複素指数関数 ez
は、 ex
cis(y) すなわち ex
(cos(y) + i sin(y)) と等しくなります。
指数関数は複素平面上の整関数であり、分岐切断はありません。
[編集] 例
Run this code
#include <complex> #include <iostream> int main() { const double pi = std::acos(-1); const std::complex<double> i(0, 1); std::cout << std::fixed << " exp(i*pi) = " << std::exp(i * pi) << '\n'; }
出力:
exp(i*pi) = (-1.000000,0.000000)
[編集] 関連項目
| 負の実軸に沿って分岐切断する複素自然対数 (関数テンプレート) | |
| (C++11)(C++11) |
e の x 乗 (ex) を計算します (関数) |
| valarray の各要素に関数 std::exp を適用します (関数テンプレート) | |
| cexp の C言語リファレンス
| |

