Computes the extended GCD and Bezout coefficients for two numbers. Uses the Extended Euclidean algorithm to find (g, s, t, sub_direction) whereDocumentation Index
Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
Use this file to discover all available pages before exploring further.
g = gcd(a, b).
The relationship between inputs and outputs is:
- If
sub_directionis true:g = s * a - t * b - If
sub_directionis false:g = t * b - s * a
(s, -t) or (-s, t) are the
Bezout coefficients (according to sub_direction).