Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C/C++ DFP | both | z/OS® V1.11 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 exp2d32(_Decimal32 x);
_Decimal64 exp2d64(_Decimal64 x);
_Decimal128 exp2d128(_Decimal128 x);
_Decimal32 exp2(_Decimal32 x); /* C++ only */
_Decimal64 exp2(_Decimal64 x); /* C++ only */
_Decimal128 exp2(_Decimal128 x); /* C++ only */
The exp2() functions compute the base-2 exponential of x.
The exp2() functions return 2 to the power x.
⁄* CELEBE14
This example illustrates the exp2d128() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
void main(void)
{
_Decimal128 x, y;
x = 4.785DL;
y = exp2d128(x);
printf("exp2d128(%DDf) = %DDf\n", x, y);
}