When computing entropy, log-likelihood, etc. it is common to treat 0*log(0)=0 as per the interpretation of an event of measure zero. Contrary to this “statistical convention,” IEEE floating-point defines 0*-Inf as NaN (not-a-number). Moreover IEEE defines NaN+7.2 as NaN (where 7.2 could be any non-NaN numeric). In Matlab this is particularly annoying when one wishes […]