test code: compute determinant of a matrix