The OpenD Programming Language

weibullPDF

Computes the Weibull probability density function (PDF).

@safe pure nothrow @nogc
T
weibullPDF
(
T
)
(
const T x
,
const T shape
,
const T scale = 1
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate PDF

shape T

shape parameter

scale T

scale parameter

Examples

import mir.test: shouldApprox;

0.0.weibullPDF(3.0).shouldApprox == 0;
0.5.weibullPDF(3.0).shouldApprox == 0.6618727;
1.0.weibullPDF(3.0).shouldApprox == 1.103638;
1.5.weibullPDF(3.0).shouldApprox == 0.2309723;

// Can also provide scale parameter
0.5.weibullPDF(2.0, 3.0).shouldApprox == 0.1080672;
1.0.weibullPDF(2.0, 3.0).shouldApprox == 0.1988532;
1.5.weibullPDF(2.0, 3.0).shouldApprox == 0.2596003;

See Also

Meta