Reduced row echelon form: Difference between revisions

m
changed test orders
m (replaced temp with multi assign and an appropriate warning)
m (changed test orders)
Line 2,651:
i
for r=1 to rowCount do
if columnCount<=lead>=columnCount then exit end if
i = r
while M[i][lead]=0 do
i += 1
if rowCount=i=rowCount then
i = r
lead += 1
if columnCount=lead=columnCount then exit end if
end if
end while
-- NBnb M[i] is assigned before M[r], which matters when i=r.:
{M[r],M[i]} = {sq_div(M[i],M[i][lead]),M[r]}
for j=1 to rowCount do
7,820

edits