Full threadTweedHeads·Javascript can do it all: function entropy(x){ return sum(p(x)*log(p(x))); }View on HN