Gaussian Distribution
Name
UxHwDoubleGaussDist
, UxHwFloatGaussDist
— Create a Gaussian distribution.
Synopsis
#include <uxhw.h>
double UxHwDoubleGaussDist(double mu, double sigma);
float UxHwFloatGaussDist(float mu, float sigma);
Description
The UxHwDoubleGaussDist()
function, on architectures that associate distributional information with floating-point values, creates a Gaussian distribution with parameters mu
and sigma
and associates it with its return value. The particle return value is the mean value of a Gaussian distribution with parameters mu
and sigma
. The probability density function of the Gaussian distribution is
Parameters
mu
— The mean value () of the Gaussian Distribution.sigma
— The standard deviation (σ) of the Gaussian Distribution.
Return Values
The UxHwDoubleGaussDist()
function returns the mean of samples of a Gaussian distribution with parameters mu
and sigma
.
If sigma < 0
, the function returns NaN
.
✏️ Examples
#include <stdio.h>
#include <uxhw.h>
int
main(void)
{
double value = UxHwDoubleGaussDist(0.0, 1.0);
printf("value = %lf\n", value);
return 0;
}