cosd32()、cosd64()、cosd128() - 余弦の計算

標準

標準/拡張機能 C/C++ 依存項目
C/C++ DFP 両方 z/OS® V1.8

形式

#define __STDC_WANT_DEC_FP__
#include <math.h> 

_Decimal32  cosd32(_Decimal32 x); 
_Decimal64  cosd64(_Decimal64 x);
_Decimal128 cosd128(_Decimal128 x);

_Decimal32  cos(_Decimal32 x);  /* C++ only */
_Decimal64  cos(_Decimal64 x);  /* C++ only */
_Decimal128 cos(_Decimal128 x); /* C++ only */

機能説明

x の余弦を計算します。x は、ラジアンで表示されます。
注 :
  1. IEEE 10 進数浮動小数点を使用するためには、ハードウェアに 10 進数浮動小数点機能 がインストールされている必要があります。
  2. これらの関数は、IEEE 10 進数浮動小数点形式で機能します。詳細は 「IEEE 10 進数浮動小数点」を参照してください。

戻り値

計算値を戻します。

x が規定された制限外にある場合、その値は計算されません。その代わりに、関数は 0 を戻し、errno を EDOM に設定します。

⁄* CELEBC48

   This example illustrates the cosd128() function.

*⁄

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

int main(void)
{
   _Decimal128 x, y;

   x = 7.2DL;
   y = cosd128(x);

   printf("cosd128(%DDf) = %DDf¥n", x, y);
}

関連情報