'Computes the determinant of a matrix from its LU decomposition.
This function uses the LU decomposition computed by
LUDecomposition_Simple().
The keyword arguments iszerofunc and simpfunc are passed to
LUDecomposition_Simple().
iszerofunc is a callable that returns a boolean indicating if its
input is zero, or None if it cannot make the determination.
simpfunc is a callable that simplifies its input.
The default is simpfunc=None, which indicate that the pivot search
algorithm should not attempt to simplify any candidate pivots.
If simpfunc fails to simplify its input, then it must return its input
instead of a copy.'

def _eval_det_lu(self, iszerofunc=_iszero, simpfunc=None):

    if (self.rows == 0):
        return S.One
    (lu, row_swaps) = self.LUdecomposition_Simple(iszerofunc=iszerofunc, simpfunc=None)
    if iszerofunc(lu[((lu.rows - 1), (lu.rows - 1))]):
        return S.Zero
    det = ((- S.One) if (len(row_swaps) % 2) else S.One)
    for k in range(lu.rows):
        det *= lu[(k, k)]
    return det
