Is there a sage module to solve equation such as ax+by=c?

722 Views Asked by At

Is there a module in Sage to solve 2 unknowns in diophantine equations? For instance, ax+by=c where a,b,c are known

I tried basic extended euclidean algorithm but my numbers are too large.

1

There are 1 best solutions below

0
Samuel Lelièvre On

Two ways of solving diophantine equations in Sage are

  • using the Smith normal form of matrices over ZZ
  • using polytopes

See the answers to these two Ask Sage questions: