__remquod32()、__remquod64()、__remquod128() - 剰余の計算

標準

標準/拡張機能 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 以上の値) を法とする (剰余である) 値を保管します。

注 :
  1. これらの関数は、IEEE 10 進数浮動小数点形式で機能します。詳細は、IEEE 10 進数浮動小数点を参照してください。
  2. IEEE 10 進数浮動小数点を使用するためには、ハードウェアに 10 進数浮動小数点機能 がインストールされている必要があります。

戻り値

__remquo() 関数は、xy で割った剰余を戻します。

⁄* 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);
}

関連情報