標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
C/C++ DFP | 両方 | z/OS® V1.8 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 expd32(_Decimal32 x);
_Decimal64 expd64(_Decimal64 x);
_Decimal128 expd128(_Decimal128 x);
_Decimal32 exp(_Decimal32 x); /* C++ only */
_Decimal64 exp(_Decimal64 x); /* C++ only */
_Decimal128 exp(_Decimal128 x); /* C++ only */
正常に実行された場合には、関数は計算値を戻します。
オーバーフローが起きた場合、関数は HUGE_VAL_D32, HUGE_VAL_D64、 または HUGE_VAL_D128 を戻します。アンダーフローが起きた場合、関数は 0 を戻します。オーバーフローもアンダーフローも errno を ERANGE に設定します。
⁄* CELEBE11
This example illustrates the expd64() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
int main(void)
{
_Decimal64 x, y;
x = 5.0DD;
y = expd64(x);
printf("expd64(%Df) = %Df¥n", x, y);
}