Previous Up Next

5.6.21  Bézout’s Identity: iegcd igcdex

iegcd(a,b) or igcdex(a,b) returns the coefficients of the Bézout’s Identity for two integers given as arguments.
iegcd(a,b) or igcdex(a,b) returns [u,v,d] such that au+bv=d and d=gcd(a,b).
Input:

iegcd(48,30)

Output:

[2,-3,6]

In other words:

2 · 48+ (−3) · 30 =6

Previous Up Next