evaluatePolynomial

Evaluates polynomial at x.