Connection
Base URL, credentials and a reachable server.
Evaluate an integer polynomial with coefficients ordered from highest degree to constant using Horner’s method.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def polynomial(coefficients, x):
coefficients = tuple(coefficients)
if type(x) is not int or any(type(c) is not int for c in coefficients):
raise ValueError("integer.required")
result = 0
for coefficient in coefficients:
result = result * x + coefficient
return result