LFDRT
Computes the determinant of a real triangular matrix.
Required Arguments
AN by N matrix containing the triangular matrix. (Input)
The matrix can be either upper or lower triangular.
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 (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = size (A,1).
FORTRAN 90 Interface
Generic: CALL LFDRT (A, DET1, DET2 [])
Specific: The specific interface names are S_LFDRT and D_LFDRT.
FORTRAN 77 Interface
Single: CALL LFDRT (N, A, LDA, DET1, DET2)
Double: The double precision name is DLFDRT.
Description
Routine LFDRT computes the determinant of a real triangular coefficient matrix. The determinant of a triangular matrix is the product of the diagonal elements
LFDRT is based on the LINPACK routine STRDI; see Dongarra et al. (1979).
Comments
Informational error
Type
Code
Description
3
1
The input triangular matrix is singular.
Example
The determinant is computed for a 3 × 3 lower triangular matrix.
 
USE LFDRT_INT
USE UMACH_INT
! Declare variables
PARAMETER (LDA=3)
REAL A(LDA,LDA), DET1, DET2
INTEGER NOUT
! Set values for A
! A = ( 2.0 )
! ( 2.0 -1.0 )
! ( -4.0 2.0 5.0)
!
DATA A/2.0, 2.0, -4.0, 0.0, -1.0, 2.0, 0.0, 0.0, 5.0/
!
! Compute the determinant of A
CALL LFDRT (A, 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.000 * 10**1.
Published date: 03/19/2020
Last modified date: 03/19/2020