exp2d32()、exp2d64()、exp2d128() - 底マイナス 2 を計算する

標準

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

形式

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  exp2d32(_Decimal32 x); 
_Decimal64  exp2d64(_Decimal64 x); 
_Decimal128 exp2d128(_Decimal128 x); 

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

機能説明

exp2() 関数は、x の底 2 の指数を計算します。

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

戻り値

exp2() 関数は、2 の x 乗を戻します。

⁄* CELEBE14

   This example illustrates the exp2d128() function.

*⁄

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

void main(void)
{
   _Decimal128 x, y;

   x = 4.785DL;
   y = exp2d128(x);

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

関連情報