Skip to main content

poisson_pmf

Function poisson_pmf 

Source
pub fn poisson_pmf<P, E, V, const LOG: bool>(k: V, lambda: V) -> V
where P: Policy, E: FloatElement, V: FloatVector<Element = E> + SpecializedSpecialMath<E>,
Expand description

The Poisson mass $e^{-\lambda}\lambda^k/k!$ at real k >= 0, lambda >= 0 (LOG = false), or its log (LOG = true), through pmf_parts. Real k because the Gamma density is the same function (dgamma(x; a) = pmf(a - 1; x) for a >= 1).

Edges: lambda = 0 gives 1 at k = 0 and 0 above; k = 0 is e^{-lambda} to a few ulp (it goes through the shifted Stirling form like any other small k).

Last built: 2026-09-08 21:35:55 UTC