Skip to main content

Generalized Extreme Value Distribution

Name​

UxHwDoubleGEVDist, UxHwFloatGEVDist — Create a Generalized extreme value (GEV) distribution with unit scale and zero location.

Synopsis​

#include <uxhw.h>

double UxHwDoubleGEVDist(double xi);
float UxHwFloatGEVDist(float xi);

Description​

The UxHwDoubleGEVDist() function, on architectures that associate distributional information with floating-point values, creates an GEV distribution with parameter xi and associates it with its return value. The particle return value is the mean value of an GEV distribution with parameter xi. The probability density function of the GEV distribution is

{e−xexp⁡(−e−x)ξ=0,(1+ξx)−(1+1/ξ)exp⁡(−(1+ξx)−1/ξ)ξ≠0 and ξx>−1,0otherwise.\begin{cases} e^{-x} \exp\left(-e^{-x}\right) & \xi = 0, \\ (1+\xi x)^{-(1+1/\xi)}\exp\left(-(1+\xi x)^{-1/\xi}\right) & \xi \neq 0\ \mathrm{ and }\ \xi x >-1, \\ 0 & \mathrm{otherwise}. \end{cases}

The support is

  • x∈[−1/ξ,∞)x\in [-1/\xi,\infty) if ξ>0\xi > 0,
  • x∈(−∞,∞)x\in (-\infty,\infty) if ξ=0\xi = 0,
  • x∈(−∞,−1/ξ]x\in (-\infty, -1/\xi] if ξ<0\xi < 0.

Parameters​

  • xi ∈(−∞,1)\in (-\infty, 1) — The shape parameter (ξ\xi) of the GEV distribution.

Return values​

The UxHwDoubleGEVDist() function returns the mean value of a GEV distribution with parameter xi and associates it with a GEV distribution with parameter xi.

Illegal parameter values​

If xi >= 1, the function returns NaN. If xi is NaN, the function returns -NaN. See Handling of NaN.

Examples​

#include <stdio.h>
#include <uxhw.h>

int
main(void)
{
double value = UxHwDoubleGEVDist(0.5);
printf("value = %lf\n", value);

return 0;
}