Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C/C++ DFP |
both | z/OS® V1.10 |
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal32 lgammad32(_Decimal32 x);
_Decimal64 lgammad64(_Decimal64 x);
_Decimal128 lgammad128(_Decimal128 x);
_Decimal32 lgamma(_Decimal32 x); /* C++ only */
_Decimal64 lgamma(_Decimal64 x); /* C++ only */
_Decimal128 lgamma(_Decimal128 x); /* C++ only */
is returned in the external integer signgam. The argument x may not be a non-positive integer.
In a multithreaded process, each thread has its own instance of the signgam variable. Threads access their instances of the variable by calling the __signgam() function. The math.h header redefines the string signgam to an invocation of the __siggam function. The actual signgam external variable is used to store the signgam value for the IPT.
These functions work in IEEE decimal floating-point format. See IEEE decimal floating-point for more information.
If successful, lgamma() returns the above function of its argument.
lgamma() will fail under the following conditions:
CELEBL26
⁄* CELEBL26
This exaxmple illustrates the lgammad64() function.
*⁄
#define __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>
int main(void)
{
_Decimal64 x, y;
x = 42.0DD;
y = lgammad64(x);
printf ("lgammad64(%Df) = %Df\n", x, y);
}