The OpenD Programming Language

bernoulliInvCDF

Computes the bernoulli inverse cumulative distribution function (InvCDF).

@safe pure nothrow @nogc
bool
bernoulliInvCDF
(
T
)
(
const T q
,
const T p
)
if (
isFloatingPoint!T
)

Parameters

q T

value to evaluate InvCDF

p T

true probability

Examples

assert(0.25.bernoulliInvCDF(0.5) == false);
assert(0.5.bernoulliInvCDF(0.5) == false);
assert(0.75.bernoulliInvCDF(0.5) == true);

assert(0.3.bernoulliInvCDF(0.7) == false);
assert(0.7.bernoulliInvCDF(0.7) == false);
assert(0.9.bernoulliInvCDF(0.7) == true);

See Also

Meta