Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Language Environment® | both | 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);
The __remquo() functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x or y and whose magnitude is congruent modulo 2 to the power n to the magnitude of the integral quotient of x or y, where n is an implementation defined integer greater than or equal to 3.
The __remquo() functions return x REM 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);
}