Given a linear Diophantine equation with many terms, for example
$aw + bx + cy + dz = e$
How do you work out $w, x, y, z$, without brute force? $a, b, c, d, e$ are given; they are also natural numbers. $a, b, c, d$ are co-prime. $w, x, y, z$ can be any integer.
I've seen this algorithm, but it looks like it only works for 2 terms. I want an algorithm that can work for any number of terms.
There are an infinite number of solutions, any of them are fine, but ones where $w$ and friends are closer to zero are better.
Context: I'm trying to extend the answer given here to multiple terms.