atanh, atanhf, atanhl

逆ハイパーボリック タンジェントを計算します。

構文

double atanh( double x );
float atanhf( float x );
long double atanhl( long double x );
#define atanh(X) // Requires C11 or higher

float atanh( float x );  // C++ only
long double atanh( long double x );  // C++ only

パラメーター

x
浮動小数点値。

戻り値

関数は atanh 、逆双曲線正接 (円弧双曲線正接) を x返します。 1 より大きい場合、または -1 未満の場合xEDOM設定され、errno結果は静かな NaN になります。 x が 1 または -1 の場合は、それぞれ正の無限大または負の無限大が返され、errnoERANGE に設定されます。

入力 SEH 例外 _matherr 例外
± QNaN、IND なし なし
X ≥ 1; x ≤ -1 なし なし

解説

C++ ではオーバーロードが可能であるため、atanh または float の値を受け取って返す long double のオーバーロードを呼び出すことができます。 C プログラムでは、tgmath.h マクロを<使用してこの関数を呼び出さない限り、atanh常に受け取って返しますdouble。>

<tgmath.h>atanh() マクロを使用する場合は、引数の型によって、この関数のどのバージョンが選択されるかが決定されます。 詳細については、「ジェネリック型数値演算」を参照してください。

既定では、この関数のグローバル状態の適用対象は、アプリケーションになります。 この動作を変更するには、「CRT のグローバル状態」を参照してください

必要条件

機能 C ヘッダー C++ ヘッダー
atanh, atanhf, atanhl <math.h> <cmath> または <math.h>
atanh マクロ <tgmath.h>

互換性の詳細については、「 Compatibility」を参照してください。

// crt_atanh.c
// This program displays the hyperbolic tangent of pi / 4
// and the arc hyperbolic tangent of the result.
//

#include <math.h>
#include <stdio.h>

int main( void )
{
   double pi = 3.1415926535;
   double x, y;

   x = tanh( pi / 4 );
   y = atanh( x );
   printf( "tanh( %f ) = %f\n", pi/4, x );
   printf( "atanh( %f ) = %f\n", x, y );
}
tanh( 0.785398 ) = 0.655794
atanh( 0.655794 ) = 0.785398

関連項目

数学と浮動小数点のサポート
acosh, acoshf, acoshl
asinh, asinhf, asinhl
cosh, coshf, coshl
sinh, sinhf, sinhl
tanh, tanhf, tanhl