Entropy Calculator

entropy command returns the entropy of given value.

entropy 5

Result:

−8.047189562170502

\[ -x \log(x) \ (x>0) \\ 0 \ (x=0) \\ \infty \ (\text{otherwise}) \]

Relative entropy

If the arguments has 2 numbers, the calculator returns the relative entropy.

entropy 5 7

Result:

−1.6823611831060645

entropy x y means that:

\[ x \log( \frac{x}{y} ) \ (x>0, \ y>0) \\ 0 \ (x=0, \ y>0) \\ \infty \ (\text{otherwise}) \]

Function

Calculator