Previous: setww Up: ../plot79_s.html Next: sgefa


SGEDI

       SUBROUTINE  SGEDI (A,LDA,N,IPVT,DET,WORK,JOB)
 C$    (Solve for Determinant and Inverse)
 C$
 C$    SGEDI computes  the determinant  and  inverse of  a  matrix
 C$    using the factors computed by SGECO or SGEFA.
 C$
 C$    ON ENTRY
 C$
 C$    A.........REAL (LDA, N).
 C$              The output from SGECO or SGEFA.
 C$
 C$    LDA.......INTEGER
 C$              The leading dimension of the array A.
 C$
 C$    N.........INTEGER
 C$              The order of the matrix A.
 C$
 C$    IPVT......INTEGER(N)
 C$              The pivot vector from SGECO or SGEFA.
 C$
 C$    WORK......REAL(N)
 C$              Work vector.  Contents destroyed.
 C$
 C$    JOB.......INTEGER
 C$              = 11   Both determinant and inverse.
 C$              = 01   Inverse only.
 C$              = 10   Determinant only.
 C$
 C$    On return
 C$
 C$    A.........Inverse of original matrix if requested.
 C$              Otherwise unchanged.
 C$
 C$    DET........REAL(2)
 C$               Determinant of original matrix if requested.
 C$               Otherwise not referenced.
 C$               Determinant = DET(1) * 10.0**DET(2)
 C$               with  1.0 .LE. ABS(DET(1)) .LT. 10.0
 C$               or  DET(1) .EQ. 0.0 .
 C$
 C$    Error condition
 C$
 C$         A division  by zero  will occur  if the  input  factor
 C$         contains a zero  on the  diagonal and  the inverse  is
 C$         requested.  It will not  occur if the subroutines  are
 C$         called correctly and if SGECO  has set RCOND .GT.  0.0
 C$         or SGEFA has set INFO .EQ. 0 .
 C$
 C$    LINPACK.  This version dated 08/14/78 .
 C$    Cleve Moler, University of New Mexico, Argonne National Lab.
 C$
 C$    Subroutines and Functions
 C$
 C$    BLAS SAXPY,SSCAL,SSWAP
 C$    FORTRAN ABS,MOD
 C$    (03-APR-82)