logPmf

abstract fun logPmf(k: Int): Double(source)

Returns the natural logarithm of the probability mass at k.

The log-mass is useful when working with very small probabilities that would underflow to zero in regular floating-point arithmetic. Every implementation provides a direct formula rather than computing ln(pmf(k)), which avoids unnecessary precision loss.

Return

the natural log of the probability mass at k. Returns Double.NEGATIVE_INFINITY when the mass is zero.

Parameters

k

the integer outcome at which to evaluate the log-mass.