Det computes the determinant of a square matrix.
This function first checks whether the matrix is full rank or not; if not,
the value 0 is returned. This avoids relatively frequent numerical errors
that produce a non-zero determinant when in fact it is zero.
Only if the matrix is full rank does the algorithm proceed to compute the determinant.
If the matrix is complex, the determinant is computed as the product of the eigenvalues; if the matrix
is real, Det calls the base function det for maximum efficiency.