The OpenD Programming Language

exponentialPDF

Computes the exponential probability density function (PDF).

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

Parameters

x T

value to evaluate PDF

lambda T

number of events in an interval

Examples

import mir.math.common: approxEqual;

assert(0.5.exponentialPDF(2.0).approxEqual(0.7357589));
assert(0.75.exponentialPDF(2.0).approxEqual(0.4462603));
assert(0.25.exponentialPDF(0.5).approxEqual(0.4412485));

See Also

Meta