The OpenD Programming Language

geometricLPMF

Computes the geometric log probability density function (LPMF).

@safe pure @nogc nothrow
T
geometricLPMF
(
T
)
(
const size_t k
,
const T p
)
if (
isFloatingPoint!T
)

Parameters

k size_t

value to evaluate LPMF

p T

true probability

Examples

import mir.math.common: exp;
import mir.test: shouldApprox;

0.geometricLPMF(0.5).exp.shouldApprox == 0.geometricPMF(0.5);
1.geometricLPMF(0.5).exp.shouldApprox == 1.geometricPMF(0.5);
2.geometricLPMF(0.25).exp.shouldApprox == 2.geometricPMF(0.25);

See Also

Meta