標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
C/C++ DFP | 両方 | z/OS® V1.8 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 fabsd32(_Decimal32 x);
_Decimal64 fabsd64(_Decimal64 x);
_Decimal128 fabsd128(_Decimal128 x);
_Decimal32 fabs(_Decimal32 x); /* C++ only */
_Decimal64 fabs(_Decimal64 x); /* C++ only */
_Decimal128 fabs(_Decimal128 x); /* C++ only */
10 進数浮動小数点入力値の絶対値を戻します。
⁄* CELEBF75
This example illustrates the fabsd128() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
int main(void)
{
_Decimal128 x, y;
x = -5.6798DL;
y = fabsd128(x);
printf("fabsd128(%DDf) = %DDf¥n", x, y);
}