Gamma Distribution
Name
UxHwDoubleGammaDist, UxHwFloatGammaDist — Create a Gamma distribution.
Synopsis
#include <uxhw.h>
double UxHwDoubleGammaDist(double k, double theta);
float UxHwFloatGammaDist(float k, float theta);
Description
The UxHwDoubleGammaDist() function, on architectures that associate distributional information with floating-point values, creates a Gamma distribution with parameters k and theta and associates it with its return value. The particle return value is the mean value of a Gamma distribution with parameters k and theta. The probability density function of the Gamma distribution is
Parameters
k— The shape parameter () of the Gamma distribution.theta— The scale parameter () of the Gamma distribution.
Return values
The UxHwDoubleGammaDist() function returns the mean value of a Gamma distribution with parameters k and theta and associates it with a Gamma distribution with parameters k and theta.
If theta = 0 and k > 0, the function returns .
Illegal parameter values
If k <= 0 or theta < 0, the function returns NaN.
If k or theta is NaN, the function returns -NaN. See Handling of NaN.
Examples
#include <stdio.h>
#include <uxhw.h>
int
main(void)
{
double value = UxHwDoubleGammaDist(1.0, 3.0);
printf("value = %lf\n", value);
return 0;
}