LFDQS

Computes the determinant of a real symmetric positive definite matrix given the RTR Cholesky factorization of the matrix in band symmetric storage mode.

Required Arguments

FACTNCODA + 1 by N array containing the RT R factorization of the positive definite band matrix, A, in band symmetric storage mode as output from subroutine LFCQS/DLFCQS or LFTQS/DLFTQS. (Input)

NCODA — Number of upper codiagonals of A. (Input)

DET1 — Scalar containing the mantissa of the determinant. (Output)
The value DET1 is normalized so that 1.0  ǀDET1ǀ < 10.0 or DET1 = 0.0.

DET2 — Scalar containing the exponent of the determinant. (Output)
The determinant is returned in the form det(A) = DET1 * 10DET2.

Optional Arguments

N — Number of equations. (Input)
Default: N = size (FACT,2).

LDFACT — Leading dimension of FACT exactly as specified in the dimension statement of the calling program. (Input)
Default: LDFACT = size (FACT,1).

FORTRAN 90 Interface

Generic: CALL LFDQS (FACT, NCODA, DET1, DET2 [, …])

Specific: The specific interface names are S_LFDQS and D_LFDQS.

FORTRAN 77 Interface

Single: CALL LFDQS (N, FACT, LDFACT, NCODA, DET1, DET2)

Double: The double precision name is DLFDQS.

Description

Routine LFDQS computes the determinant of a real symmetric positive-definite band coefficient matrix. To compute the determinant, the coefficient matrix must first undergo an RT R factorization. This may be done by calling either IMSL routine LFCQS or LFTQS. The formula
det A = det RT det R = (det R)2 is used to compute the determinant. Since the determinant of a triangular matrix is the product of the diagonal elements,

 

LFDQS is based on the LINPACK routine SPBDI; see Dongarra et al. (1979).

Example

The determinant is computed for a real positive definite 4 × 4 matrix with 2 codiagonals.

 

USE LFDQS_INT

USE LFTQS_INT

USE UMACH_INT

! Declare variables

INTEGER LDA, LDFACT, N, NCODA, NOUT

PARAMETER (LDA=3, N=4, LDFACT=3, NCODA=2)

REAL A(LDA,N), DET1, DET2, FACT(LDFACT,N)

!

! Set values for A in band symmetric form

!

! A = ( 0.0 0.0 1.0 -2.0 )

! ( 0.0 2.0 1.0 3.0 )

! ( 7.0 6.0 6.0 8.0 )

!

DATA A/2*0.0, 7.0, 0.0, 2.0, 6.0, 1.0, 1.0, 6.0, -2.0, 3.0, 8.0/

! Factor the matrix

CALL LFTQS (A, NCODA, FACT)

! Compute the determinant

CALL LFDQS (FACT, NCODA, DET1, DET2)

! Print results

CALL UMACH (2, NOUT)

WRITE (NOUT,99999) DET1, DET2

!

99999 FORMAT (’ The determinant of A is ’,F6.3,’ * 10**’,F2.0)

END

Output

 

The determinant of A is 1.186 * 10**3.