Previous Up Next

2.6.21  Solving au+bv=c in ℤ: iabcuv

iabcuv(a,b,c) returns [u,v] so that au+bv=c.
c must be a multiple of gcd(a,b) for the existence of a solution.
Input :

iabcuv(48,30,18)

Output :

[6,-9]

Previous Up Next