Don't compute decay_factor ** count when not needed anymore: otherwise we eventually get an OverflowError