If is positive definite, then , and the determinant is the product of the squares of the diagonal elements of . Otherwise, the routines in this chapter use the Dolittle form of the decomposition, where has unit elements on its diagonal. The determinant is then the product of the diagonal elements of , taking account of possible sign changes due to row interchanges.
To avoid overflow or underflow in the computation of the determinant, some scaling is associated with each multiplication in the product of the relevant diagonal elements. The final value is represented by
where is an integer and
For complex valued determinants the real and imaginary parts are scaled separately.
3Recommendations on Choice and Use of Available Routines
It is extremely wasteful of computer time and storage to use an inappropriate routine, for example to use a routine requiring a complex matrix when is real. Most programmers will know whether their matrix is real or complex, but may be less certain whether or not a real symmetric matrix is positive definite, i.e., all eigenvalues of . A real symmetric matrix not known to be positive definite must be treated as a general real matrix.
In all other cases either the band routine or the general routines must be used.
The routines in this chapter are general purpose routines. These give the value of the determinant in its scaled form, and , given the triangular decomposition of the matrix from a suitable routine from Chapter F07.