def det_hermitian(x):
    if x.nrows() < 5:
        return count_det(fmpz_mat(x))
    # print 'source matrice A:\n',x
    y, z = decompose_hermitian(x)
    if y == None:
        # return count_det( fmpz_mat(x) )
        return flint.count_det_suspected_zero(fmpz_mat(x), z)
    else:
        return count_det(fmpz_mat(y)) * z
def det_hermitian_time(x):
    if x.nrows() < 5:
        return count_det(fmpz_mat(x)), 0
    # print 'source matrice A:\n',x
    y, z = decompose_hermitian(x)
    if y == None:
        # return count_det( fmpz_mat(x) )
        t0 = time.time()
        rez = flint.count_det_suspected_zero(fmpz_mat(x), z)
        spent = time.time() - t0
    else:
        rez = count_det(fmpz_mat(y)) * z
        spent = 0
    return rez, spent