標準/拡張機能 | 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 の指数を計算します。
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);
}