Bareiss algorithm resultant/determinant 4x4 O(n^3) (compact) | ScratchStats