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

f(x;ξ)={exexp(ex)ξ=0,(1+ξx)(1+1/ξ)exp((1+ξx)1/ξ)ξ0 and ξx>1,0otherwise.f(x;\xi)= \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 The parameter (ξ\xi) of the GEV distribution.

Return Values

The UxHwDoubleGEVDist() function returns the mean of samples of a GEV distribution with parameter xi. If xi >= 1, the function returns NaN.

  Examples

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

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

return 0;
}