skips log(0) calculations without calculating them