acosh
, acoshf
, acoshl
逆ハイパーボリック コサインを計算します。
構文
double acosh( double x );
float acoshf( float x );
long double acoshl( long double x );
#define acosh(X) // Requires C11 or higher
float acosh( float x ); // C++ only
long double acosh( long double x ); // C++ only
パラメーター
x
浮動小数点値。
戻り値
関数は acosh
、逆双曲線余弦 (アーク双曲線余弦) を x
返します。 これらの関数はドメイン x
≥ 1 で有効です。 1 未満の場合x
は 、にEDOM
設定され、errno
結果は静かな NaN になります。 x
が簡易な NaN、不定値、または無限大の場合は、同じ値が返されます。
入力 | SEH 例外 | _matherr 例外 |
---|---|---|
± QNaN、IND、INF | なし | なし |
x < 1 |
なし | なし |
解説
C++ を使用する場合、 acosh
または float
の値を受け取って返す long double
のオーバーロードを呼び出すことができます。 C プログラムでは、tgmath.h マクロを<使用してこの関数を呼び出さない限り、acosh
常に受け取って返しますdouble
。>
<tgmath.h>acosh()
マクロを使用する場合は、引数の型によって、この関数のどのバージョンが選択されるかが決定されます。 詳細については、「ジェネリック型数値演算」を参照してください。
既定では、この関数のグローバル状態の適用対象は、アプリケーションになります。 この動作を変更するには、「CRT のグローバル状態」を参照してください。
必要条件
機能 | C ヘッダー | C++ ヘッダー |
---|---|---|
acosh , acoshf , acoshl |
<math.h> | <cmath> |
acosh マクロ |
<tgmath.h> |
互換性の詳細については、「 Compatibility」を参照してください。
例
// crt_acosh.c
// Compile by using: cl /W4 crt_acosh.c
// This program displays the hyperbolic cosine of pi / 4
// and the arc hyperbolic cosine of the result.
#include <math.h>
#include <stdio.h>
int main( void )
{
double pi = 3.1415926535;
double x, y;
x = cosh( pi / 4 );
y = acosh( x );
printf( "cosh( %f ) = %f\n", pi/4, x );
printf( "acosh( %f ) = %f\n", x, y );
}
cosh( 0.785398 ) = 1.324609
acosh( 1.324609 ) = 0.785398
関連項目
数学と浮動小数点のサポート
asinh
, asinhf
, asinhl
atanh
, atanhf
, atanhl
cosh
, coshf
, coshl
sinh
, sinhf
, sinhl
tanh
, tanhf
, tanhl
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示