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