In my estimation, the best way to solve sets of linear equations via a computer is to use Cramer's rule; it fundamentally requires only one division and it's right at the end, which makes it less error-prone than, say, Gaussian elimination. The only hitch is that solving determinants can be slow, and maddeningly slow as arrays get bigger and bigger. This is where the Bareiss algorithm comes in; it needs to be taught. It is roughly as fast as Gaussian elimination, but it does not involve all the division that Gaussian does. Bareiss does in fact involve SOME division, but if all your elements are integers, Bareiss is guaranteed to provide an integer result to those divisions. As a result, determinants will quickly be resolved to something like 7, rather than 7.00000049.
In my estimation, the best way to solve sets of linear equations via a computer is to use Cramer's rule; it fundamentally requires only one division and it's right at the end, which makes it less error-prone than, say, Gaussian elimination.
The only hitch is that solving determinants can be slow, and maddeningly slow as arrays get bigger and bigger. This is where the Bareiss algorithm comes in; it needs to be taught. It is roughly as fast as Gaussian elimination, but it does not involve all the division that Gaussian does. Bareiss does in fact involve SOME division, but if all your elements are integers, Bareiss is guaranteed to provide an integer result to those divisions. As a result, determinants will quickly be resolved to something like 7, rather than 7.00000049.
Thanks for cracking through the tedium.
It is my honor!
Thank you sir
Glad to help - thanks for watching!
It's fixed now 🎉
Did you hear about the *Inverse* Cramer rule, "Buy high, sell low"? 😆