guarding infinities in d_log implementations