Fix documentation of entropy function

Fix the documentation of the entropy function to correct the formula so
it reflects the calculation used in the code. Also mention the unit of
the value returned,
Merge pull request #3018 from captainwhippet/master

Fix documentation of entropy function