--- from: http://rosettacode.org/wiki/Entropy note: Mathematics