The OpenD Programming Language

exponentialCDF

Computes the exponential cumulative distribution function (CDF).

@safe pure nothrow @nogc
T
exponentialCDF
(
T
)
(
const T x
,
const T lambda
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate CDF

lambda T

number of events in an interval

Examples

import mir.math.common: approxEqual;

assert(0.5.exponentialCDF(2.0).approxEqual(0.6321206));
assert(0.75.exponentialCDF(2.0).approxEqual(0.7768698));
assert(0.25.exponentialCDF(0.5).approxEqual(0.1175031));

See Also

Meta