cbrtd32()、cbrtd64()、cbrtd128() - 立方根の計算

標準

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

形式

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  cbrtd32(_Decimal32 x); 
_Decimal64  cbrtd64(_Decimal64 x); 
_Decimal128 cbrtd128(_Decimal128 x); 

_Decimal32  cbrt(_Decimal32 x);      /* C++ only */
_Decimal64  cbrt(_Decimal64 x);      /* C++ only */
_Decimal128 cbrt(_Decimal128 x);     /* C++ only */

機能説明

cbrt() 関数は、引数 x の実立方根を計算します。

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

⁄* CELEBC52

   This example illustrates the cbrtd64() function.

*⁄

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

void main(void)
{
   _Decimal64 x, y;

   x = 1000.0DD;
   y = cbrtd64(x);

   printf("cbrtd64( %Df ) = %Df¥n", x, y);
}

戻り値

cbrt 関数は x の 1/3 乗を戻します。

cbrt() は失敗しません。

関連情報