#51 Avoid doing Math.log twice.