NAG Library Routine Document
F03BHF computes the determinant of a
symmetric positive definite banded matrix
that has been stored in band-symmetric storage. F07HDF (DPBTRF)
must be called first to supply the Cholesky factorized form. The storage (upper or lower triangular) used by F07HDF (DPBTRF)
is relevant as this determines which elements of the stored factorized form are referenced.
||N, KD, LDAB, ID, IFAIL
The determinant of is calculated using the Cholesky factorization , where is an upper triangular band matrix, or , where is a lower triangular band matrix. The determinant of is the product of the squares of the diagonal elements of or .
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
- 1: UPLO – CHARACTER(1)Input
: indicates whether the upper or lower triangular part of
was stored and how it was factorized. This should not be altered following a call to F07HDF (DPBTRF)
- The upper triangular part of was originally stored and was factorized as where is upper triangular.
- The lower triangular part of was originally stored and was factorized as where is lower triangular.
- 2: N – INTEGERInput
On entry: , the order of the matrix .
- 3: KD – INTEGERInput
On entry: , the number of superdiagonals or subdiagonals of the matrix .
- 4: AB(LDAB,) – REAL (KIND=nag_wp) arrayInput
the second dimension of the array AB
must be at least
: the Cholesky factor of
, as returned by F07HDF (DPBTRF)
- 5: LDAB – INTEGERInput
: the first dimension of the array AB
as declared in the subprogram from which F03BHF is called.
- 6: D – REAL (KIND=nag_wp)Output
- 7: ID – INTEGEROutput
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
- 8: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
|On entry,|| or .|
The matrix is not positive definite.
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis see page 54 of Wilkinson and Reinsch (1971)
The time taken by F03BHF is approximately proportional to .
This routine should only be used when since as approaches , it becomes less efficient to take advantage of the band form.
This example calculates the determinant of the real symmetric positive definite band matrix
9.1 Program Text
Program Text (f03bhfe.f90)
9.2 Program Data
Program Data (f03bhfe.d)
9.3 Program Results
Program Results (f03bhfe.r)