Skip to main content

Logistic Distribution

Name

UxHwDoubleLogisticDist, UxHwFloatLogisticDist Create a Logistic distribution.

Synopsis

#include <uxhw.h>

double UxHwDoubleLogisticDist(double location, double scale);
float UxHwFloatLogisticDist(float location, float scale);

Description

The UxHwDoubleLogisticDist() function, on architectures that associate distributional information with floating-point values, creates a Logistic distribution with parameters location and scale and associates it with its return value. The particle return value is the mean value of a Logistic distribution with parameters location and scale. The probability density function of the Logistic distribution is

f(x;μ,s)=14ssech2(xμ2s).f(x;\mu, s)=\frac{1}{4s}\text{sech}^2\left(\frac{x-\mu}{2s}\right).

Parameters

  • location The location parameter (μ\mu) of the Logistic distribution.
  • scale The scale parameter (s) of the Logistic distribution.

Return Values

The UxHwDoubleLogisticDist() function returns the mean of samples of a Logistic distribution with parameters location and scale. If scale < 0, the function returns NaN.

  Examples

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

int
main(void)
{
double value = UxHwDoubleLogisticDist(5.0, 2.0);
printf("value = %lf\n", value);

return 0;
}