cpp/numeric/random/random device/entropy

Obtains an estimate of the random number device entropy, which is a floating-point value between $0$ and $log 2(max+1)$ (which is equal to ). If the device has $n$ states whose individual probabilities are $P 0,...,P n-1$, the device entropy $S$ is defined as

$S = −∑n-1 i=0 P ilog(P i)$

A deterministic random number generator (e.g. a pseudo-random engine) has entropy zero.

Return value
The value of the device entropy, or zero if not applicable.