Previous Up Next

6.5.20 Solving au+bv=c in ℤ: iabcuv

The iabcuv solves a linear Diophantine equation in two variables.

Note that c must be a multiple of gcd(a,b) for the existence of a solution.


Example.
Input:

iabcuv(48,30,18)

Output:

⎡
⎣
6,−9⎤
⎦

Previous Up Next