The OpenD Programming Language

uniformCDF

Computes the uniform cumulative distribution function (CDF).

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

Parameters

x T

value to evaluate CDF

lower T

lower bound

upper T

upper bound

Examples

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

See Also

Meta