Function: matdetint
Section: linear_algebra
C-Name: detint
Prototype: G
Help: matdetint(B): some multiple of the determinant of the lattice
 generated by the columns of B (0 if not of maximal rank). Useful with
 mathnfmod.
Doc:
 Let $B$ be an $m\times n$ matrix with integer coefficients. The
 \emph{determinant} $D$ of the lattice generated by the columns of $B$ is
 the square root of $\det(B^T B)$ if $B$ has maximal rank $m$, and $0$
 otherwise.

 This function uses the Gauss-Bareiss algorithm to compute a positive
 \emph{multiple} of $D$. When $B$ is square, the function actually returns
 $D = |\det B|$.

 This function is useful in conjunction with \kbd{mathnfmod}, which needs to
 know such a multiple. If the rank is maximal and the matrix non-square,
 you can obtain $D$ exactly using
 \bprog
   matdet( mathnfmod(B, matdetint(B)) )
 @eprog\noindent
 Note that as soon as one of the dimensions gets large ($m$ or $n$ is larger
 than 20, say), it will often be much faster to use \kbd{mathnf(B, 1)} or
 \kbd{mathnf(B, 4)} directly.
