Calculate log entropy better.