- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine calculates the
determinant of an arbitrary n-by-n matrix. It LU decomposes the matrix and then forms the product
of the diagonals by summing their logarithms to base 10. Logarithmic calculations are
used to prevent overflows. A bad status is returned when the matrix is singular or the
determinant is too large to store in the chosen data type’
s number representation.
Invocation
CALL KPG1_MDETX( N, EL, ARRAY, WORK1, WORK2, DET, STATUS )
Arguments
N =
INTEGER (Given)
The number of rows and columns in the matrix whose determinant is
to be derived.
EL = INTEGER (Given)
The size of the first dimension of the array as
declared in the calling routine. This should be at least equal to N.
ARRAY( EL, N ) = ?
(Given and Returned)
On input this is the matrix whose determinant is to be found. Since
the LU decomposition is performed in situ, the input values are lost. (On exit it is the LU
decomposed form of the rowwise-permuted input ARRAY, with the diagonals being part of the
upper triangular matrix.)
WORK1( N ) = INTEGER (Returned)
Workspace for the LU
decomposition.
WORK2( N ) = ? (Returned)
Workspace for the LU decomposition.
DET = ? (Returned)
The determinant of matrix ARRAY. It is set to 1.0 when the matrix
is singular.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑