Using the remainder theorem to evaluate a polynomial