Connection
Base URL, credentials and a reachable server.
Inspect the gcd and both coefficients together against the signed input identity, including the case where both operands are zero.
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 bezout(a, b):
if any(type(v) is not int or abs(v) >= 10**100 for v in (a, b)):
raise ValueError("integer.range")
old_r, r = abs(a), abs(b)
old_s, s, old_t, t = 1, 0, 0, 1
while r:
q = old_r // r
old_r, r = r, old_r - q * r
old_s, s = s, old_s - q * s
old_t, t = t, old_t - q * t
return old_r, old_s * (-1 if a < 0 else 1), old_t * (-1 if b < 0 else 1)