Matrix LU factorization with simple gauss