tanhd32()、tanhd64()、tanhd128() - 双曲線正接の計算

標準

標準/拡張機能 C/C++ 依存項目

C/C++ DFP

両方 z/OS V1.10

形式

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  tanhd32(_Decimal32 x);
_Decimal64  tanhd64(_Decimal64 x);
_Decimal128 tanhd128(_Decimal128 x);
_Decimal32  tanh(_Decimal32 x);     /* C++ only */
_Decimal64  tanh(_Decimal64 x);     /* C++ only */
_Decimal128 tanh(_Decimal128 x);    /* C++ only */

機能説明

x の双曲線正接を計算します。ここで、x はラジアンで表されます。

戻り値

x の双曲線正接の計算値を戻します。

結果がアンダーフローした場合には、関数は 0 を戻し、errno を ERANGE に設定します。

CELEBT23
⁄* CELEBT23

   This example illustrates the tanhd64() function.

   This example computes x as the hyperbolic tangent of PI⁄4.

*⁄

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

int main(void)
{
   _Decimal64 pi, x;

   pi = 3.1415926DD;
   x = tanhd64(pi⁄4.0DD);

   printf("tanhd64( %Df ) = %Df¥n", pi⁄4.0DD, x);
}

関連情報