Compute determinant in polynomial-time.