標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
C/C++ DFP | 両方 | z/OS® V1.11 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 cbrtd32(_Decimal32 x);
_Decimal64 cbrtd64(_Decimal64 x);
_Decimal128 cbrtd128(_Decimal128 x);
_Decimal32 cbrt(_Decimal32 x); /* C++ only */
_Decimal64 cbrt(_Decimal64 x); /* C++ only */
_Decimal128 cbrt(_Decimal128 x); /* C++ only */
cbrt() 関数は、引数 x の実立方根を計算します。
⁄* CELEBC52
This example illustrates the cbrtd64() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
void main(void)
{
_Decimal64 x, y;
x = 1000.0DD;
y = cbrtd64(x);
printf("cbrtd64( %Df ) = %Df¥n", x, y);
}
cbrt 関数は x の 1/3 乗を戻します。
cbrt() は失敗しません。