Available on all platforms
reducer.shannonentropy.0 computes the Shannon entropy of the values it receives from the framework
REDUCE at each tick.
The values are considerred as occurences of an underlying symbol (or as values of a counter).
The returned entropy is normalized by being divided by log(N) where N is the number of values.
If N equals 1, then 0 is returned.
The input values must be of type LONG.
0 10 <% 'i' STORE $i $j * 100 * NaN NaN NaN $i ADDVALUE %> FOR
$j TOSTRING RENAME
[ SWAP  reducer.shannonentropy.0 ] REDUCE