標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
C/C++ DFP | 両方 | z/OS® V1.8 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 log10d32(_Decimal32 x);
_Decimal64 log10d64(_Decimal64 x);
_Decimal128 log10d128(_Decimal128 x);
_Decimal32 log10(_Decimal32 x); /* C++ only */
_Decimal64 log10(_Decimal64 x); /* C++ only */
_Decimal128 log10(_Decimal128 x); /* C++ only */
正常に実行された場合、関数は、x の正の値の 10 を基数とする対数を戻します。
x が負の場合、関数は errno を EDOM に設定し、NaNQ を戻します。
x が 0 の場合、関数は -HUGE_VAL、-HUGE_VAL_D64、または -HUGE_VAL_D128 を戻し、errno は変更されません。
⁄* CELEBL23
This example illustrates the log10d128() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
int main(void)
{
_Decimal128 x = 1000.0DL, y;
y = log10d128(x);
printf("The base 10 logarithm of %DDf is %DDf¥n", x, y);
}