The OpenD Programming Language

exponentialLPDF

Computes the exponential log probability density function (LPDF).

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

Parameters

x T

value to evaluate LPDF

lambda T

number of events in an interval

Examples

import mir.math.common: approxEqual, log;

assert(0.5.exponentialLPDF(2.0).approxEqual(log(exponentialPDF(0.5, 2.0))));
assert(0.75.exponentialLPDF(2.0).approxEqual(log(exponentialPDF(0.75, 2.0))));
assert(0.25.exponentialLPDF(0.5).approxEqual(log(exponentialPDF(0.25, 0.5))));

See Also

Meta