The OpenD Programming Language

weibullInvCDF

Computes the Weibull inverse cumulative distribution function (InvCDF).

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

Parameters

p T

value to evaluate InvCDF

shape T

shape parameter

scale T

scale parameter

Examples

import mir.test: shouldApprox;

weibullInvCDF(0.0, 3).shouldApprox == 0.0;
weibullInvCDF(0.25, 3).shouldApprox == 0.6601424;
weibullInvCDF(0.5, 3).shouldApprox == 0.884997;
weibullInvCDF(0.75, 3).shouldApprox == 1.115026;
weibullInvCDF(1.0, 3).shouldApprox == double.infinity;

// Can also provide scale parameter
weibullInvCDF(0.2, 2, 3).shouldApprox == 1.417142;
weibullInvCDF(0.4, 2, 3).shouldApprox == 2.144162;
weibullInvCDF(0.6, 2, 3).shouldApprox == 2.871692;
weibullInvCDF(0.8, 2, 3).shouldApprox == 3.805909;

See Also

Meta