Using ln(P(x)) / ln(2) for continuous and, for binary, L(p;f)=log2(p/0.5) for f=1 and L(p;f)=log2((1−p)/0.5) for f=0