scalbnd32()、scalbnd64()、scalbnd128() および scalblnd32()、 scalblnd64()、scalblnd128() - 指数関数のロード

標準

標準/拡張機能 C/C++ 依存項目
C/C++ DFP 両方 z/OS® V1.8

形式

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  scalbnd32(_Decimal32 x, int n); 
_Decimal64  scalbnd64(_Decimal64 x, int n);
_Decimal128 scalbnd128(_Decimal128 x, int n);
_Decimal32  scalbn(_Decimal32 x, int n);    /* C++ only */
_Decimal64  scalbn(_Decimal64 x, int n);    /* C++ only */
_Decimal128 scalbn(_Decimal128 x, int n);   /* C++ only */

_Decimal32  scalblnd32(_Decimal32 x, long int n); 
_Decimal64  scalblnd64(_Decimal64 x, long int n);
_Decimal128 scalblnd128(_Decimal128 x, long int n);
_Decimal32  scalbln(_Decimal32 x, long int n);    /* C++ only */
_Decimal64  scalbln(_Decimal64 x, long int n);    /* C++ only */
_Decimal128 scalbln(_Decimal128 x, long int n)    /* C++ only */

機能説明

scalbn() および scalbln() ファミリーの関数は、10 の n 乗を明示的に計算することによって、(x * 10 の n 乗) を効率的に (通常とは異なる方法で) 計算します。

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

戻り値

scalbn() および scalbln() ファミリーの関数は、(x * 10 の n 乗) を戻します。

⁄* CELEBS68

   This example illustrates the scalbnd128() function.

*⁄

#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>

int main(void)
{
   _Decimal128 x, y;

   x = 7.2DL;
   y = scalbnd128(x, 6000);

   printf("scalbnd128(%DDf, 6000) = %DDe¥n", x, y);
}

関連情報