HP MLIB User's Guide Vol. 2 7th Ed.

Appendix B 1101
Solve linear equations DGESL
Input a Array containing the triangular factors L and U of the
n-by-n coefficient matrix A as computed by the
companion factorization or condition number
estimation subprogram. a must have been preserved
between the factorization call and the solve call.
lda The leading dimension of array a as declared in the
calling program unit, with lda max(n,1).
n The order of matrix A, n 0.
ipvt The pivot information necessary to construct the
permutation matrix P as computed by the companion
factorization subprogram. ipvt must have been
preserved between the factorization call and the solve
call.
b The right-hand-side vector b.
job Option flag:
job = 0 Solve Ax = b.
job 0 Solve A
T
x = b.
Output b The solution vector x overwrites the right-hand-side
vector b.
Notes DGESL is usage compatible with the standard LINPACK subprograms.
Example Solve a system of linear equations A
T
x = b, where A is a 6-by-6 REAL*8 matrix
stored in array A whose dimensions are 10-by-10, and b is a vector 6 elements
long stored in an array B of dimension 10.
INTEGER*4 LDA,N,IPVT(10),IER,JOB
REAL*8 A(10,10),B(10)
LDA = 10
N = 6
JOB = 1
CALL DGEFA (A,LDA,N,IPVT,IER)
IF ( IER .EQ. 0 ) THEN
CALL DGESL (A,LDA,N,IPVT,B,JOB)
ELSE
handle singular matrix
END IF
If the coefficient matrix A is determined to be nonsingular, the solution vector x
overwrites the right-hand-side b in array b.