ハイパーボリック サインを計算します。
構文
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
#define sinh(x) // Requires C11 or later
float sinh(float x); // C++ only
long double sinh(long double x); // C++ only
パラメーター
x
角度 (ラジアン)。
戻り値
sinh 関数は、x のハイパーボリック サイン値を返します。 既定では、結果が大きすぎる場合、 sinh は errno を ERANGE に設定し、±HUGE_VALを返します。
| 入力 | 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