Corrected cont_entropy calculation.