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