catanhf, catanh, catanhl
提供: cppreference.com
<tbody>
</tbody>
| ヘッダ <complex.h> で定義
|
||
float complex catanhf( float complex z ); |
(1) | (C99以上) |
double complex catanh( double complex z ); |
(2) | (C99以上) |
long double complex catanhl( long double complex z ); |
(3) | (C99以上) |
| ヘッダ <tgmath.h> で定義
|
||
#define atanh( z ) |
(4) | (C99以上) |
1-3)
z の複素逆双曲線正接を計算します。 実軸に沿って区間 [−1; +1] の外側に分岐切断を持ちます。4) 型総称マクロ。
z が long double complex 型の場合は catanhl が呼ばれ、 z が double complex 型の場合は catanh が呼ばれ、 z が float complex 型の場合は catanhf が呼ばれます。 z が実数または整数の場合、このマクロは対応する実数の関数 (atanhf、 atanh、 atanhl) を呼びます。 z が虚数の場合、このマクロは atan の対応する実数版を呼んで公式 atanh(iy) = i atan(y) を実装し、戻り値型は虚数になります。引数
| z | - | 複素数の引数 |
戻り値
エラーが発生しなければ、 z の複素逆双曲線正接を返します。 戻り値は実部が数学的に非有界で虚部が [−iπ/2; +iπ/2] の範囲内の半帯状の範囲内になります。
エラー処理および特殊な値
エラーは math_errhandling と一貫性があるように報告されます。
処理系が IEEE 浮動小数点算術をサポートしている場合、
catanh(conj(z)) == conj(catanh(z))です。catanh(-z) == -catanh(z)です。zが+0+0iであれば、結果は+0+0iです。zが+0+NaNiであれば、結果は+0+NaNiです。zが+1+0iであれば、結果は+∞+0iであり、 FE_DIVBYZERO が発生します。zがx+∞i(ただし x は任意の有限な正の値) であれば、結果は+0+iπ/2です。zがx+NaNi(ただし x は任意の有限な非ゼロの値) であれば、結果はNaN+NaNiであり、 FE_INVALID が発生するかもしれません。zが+∞+yi(ただし y は任意の有限な正の値) であれば、結果は+0+iπ/2です。zが+∞+∞iであれば、結果は+0+iπ/2です。zが+∞+NaNiであれば、結果は+0+NaNiです。zがNaN+yi(ただし y は任意の有限な値) であれば、結果はNaN+NaNiであり、 FE_INVALID が発生するかもしれません。zがNaN+∞iであれば、結果は±0+iπ/2(実部の符号は未規定) です。zがNaN+NaNiであれば、結果はNaN+NaNiです。
ノート
C 標準はこの関数に「complex arc hyperbolic tangent」と名付けていますが、双曲線関数の逆関数は面積関数です。 引数は双曲的扇形の面積であり、円弧 (arc) ではありません。 正しい名前は「complex inverse hyperbolic tangent」、あるいは、あまり一般的ではありませんが、「complex area hyperbolic tangent」です。
逆双曲線正接は多値関数であり、複素平面上に分岐切断を要求します。 分岐切断は慣習的に実軸上の線分 (-∞,-1] および [+1,+∞) に置かれます。
逆双曲線正接の主値の数学的な定義は
atanh z =| ln(1+z)-ln(z-1) |
| 2 |
です。
任意の z について
atanh(z) =| atan(iz) |
| i |
が成り立ちます。
例
Run this code
#include <stdio.h>
#include <complex.h>
int main(void)
{
double complex z = catanh(2);
printf("catanh(+2+0i) = %f%+fi\n", creal(z), cimag(z));
double complex z2 = catanh(conj(2)); // or catanh(CMPLX(2, -0.0)) in C11
printf("catanh(+2-0i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
// for any z, atanh(z) = atan(iz)/i
double complex z3 = catanh(1+2*I);
printf("catanh(1+2i) = %f%+fi\n", creal(z3), cimag(z3));
double complex z4 = catan((1+2*I)*I)/I;
printf("catan(i * (1+2i))/i = %f%+fi\n", creal(z4), cimag(z4));
}
出力:
catanh(+2+0i) = 0.549306+1.570796i
catanh(+2-0i) (the other side of the cut) = 0.549306-1.570796i
catanh(1+2i) = 0.173287+1.178097i
catan(i * (1+2i))/i = 0.173287+1.178097i
参考文献
- C11 standard (ISO/IEC 9899:2011):
- 7.3.6.3 The catanh functions (p: 193)
- 7.25 Type-generic math <tgmath.h> (p: 373-375)
- G.6.2.3 The catanh functions (p: 540-541)
- G.7 Type-generic math <tgmath.h> (p: 545)
- C99 standard (ISO/IEC 9899:1999):
- 7.3.6.3 The catanh functions (p: 175)
- 7.22 Type-generic math <tgmath.h> (p: 335-337)
- G.6.2.3 The catanh functions (p: 475-476)
- G.7 Type-generic math <tgmath.h> (p: 480)
関連項目
(C99)(C99)(C99) |
複素数逆双曲線正弦を計算します (関数) |
(C99)(C99)(C99) |
複素数逆双曲線余弦を計算します (関数) |
(C99)(C99)(C99) |
複素数双曲線正接を計算します (関数) |
(C99)(C99)(C99) |
逆双曲線正接 (artanh(x)) を計算します (関数) |
atanh の C++リファレンス
| |