標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
Language Environment® | 両方 | z/OS® V1.11 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 __remquod32(_Decimal32 x, _Decimal32 y, int *quo);
_Decimal64 __remquod64(_Decimal64 x, _Decimal64 y, int *quo);
_Decimal128 __remquod128(_Decimal128 x, _Decimal128 y, int *quo);
__remquo() 関数は、remainder 関数と同じ剰余を計算します。 remquo 関数は、quo で指されるオブジェクトの中に、符号は x または y の符号であり、 絶対値は x または y の整数商の絶対値に対して 2 の n 乗 (n はインプリメンテーション依存の 3 以上の値) を法とする (剰余である) 値を保管します。
__remquo() 関数は、x を y で割った剰余を戻します。
⁄* CELEBR24
This example illustrates the __remquod64() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
void main() {
_Decimal64 x, y, z;
int n;
x = 3.0DD;
y = 3.5DD;
z = __remquod64(x, y, &n);
printf("__remquod64( %Df, %Df, %d ) = %Df¥n", x, y, n, z);
}