reducing risk of overflow in the beginning by not evaluating exp(new-old)