Previous Up Next

2.6.20  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 argument.
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