Talk:Reduced row echelon form: Difference between revisions

Content added Content deleted
Line 112: Line 112:
I tried putting in a singular matrix into the C# code and it is giving divide by zero errors. When I told it to skip when it is dividing by zero, the results keep changing. Also I corrected an error in the C# code that caused the lead value to be out of bounds.
I tried putting in a singular matrix into the C# code and it is giving divide by zero errors. When I told it to skip when it is dividing by zero, the results keep changing. Also I corrected an error in the C# code that caused the lead value to be out of bounds.
: I won't be able to test it myself, but can you provide a sample matrix that reproduces the problem? --[[User:Short Circuit|Michael Mol]] 03:08, 10 October 2010 (UTC)
: I won't be able to test it myself, but can you provide a sample matrix that reproduces the problem? --[[User:Short Circuit|Michael Mol]] 03:08, 10 October 2010 (UTC)

:: this gives a divide by zero:
:: 1,0,1,0,1,0
:: 1,0,1,0,0,1
:: 1,0,0,1,1,0
:: 1,0,0,1,0,1
:: 0,1,0,1,1,0
:: 0,1,0,1,0,1
:: 0,1,1,0,1,0
:: 0,1,1,0,0,1
:: I haven't looked into it in detail, but adding an "if (div != 0)" line before the offending division seems to make it behave reasonably.