The OpenD Programming Language

uniformCCDF

Computes the uniform complementary cumulative distribution function (CCDF).

@safe pure nothrow @nogc
T
uniformCCDF
(
T
)
(
const T x
,
const T lower = 0
,
const T upper = 1
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate CCDF

lower T

lower bound

upper T

upper bound

Examples

import mir.math.common: approxEqual;
assert(0.5.uniformCCDF == 0.5);
assert(0.5.uniformCCDF(0.0, 1.5).approxEqual(2.0 / 3));
assert(2.5.uniformCCDF(1.0, 3.0).approxEqual(1.0 / 4));

See Also

Meta