slaSmat -

SYNOPSYS

void slaSmat(n, a, y, d, jf, iw)

PARAMETERS

int n
float *a
float *y
float *d
int *jf
int *iw

DESCRIPTION


  Matrix inversion & solution of simultaneous equations.

  (single precision)

For the set of n simultaneous equations in n unknowns

     a.y = x

where

     a is a non-singular n x n matrix
     y is the vector of n unknowns
     x is the known vector

slaSmatt computes

     the inverse of matrix a
     the determinant of matrix a
     the vector of n unknowns

Arguments


     symbol  type dimension           before              after

       n      long                 no. of unknowns       unchanged
       a      float  [n][n]            matrix             inverse
       y      float   [n]              vector            solution
      *d      float                      -              determinant
    > *jf     long                       -            singularity flag
       iw     long    [n]                -               workspace


    > jf is the singularity flag.  If the matrix is non-singular,
      jf=0 is returned.  If the matrix is singular, jf=-1 & d=0.0 are
      returned.  In the latter case, the contents of array a on return
      are undefined.

Algorithm

     Gaussian elimination with partial pivoting.

Speed

     Very fast.

Accuracy

     Fairly accurate - errors 1 to 4 times those of routines optimized
     for accuracy.

  P.T.Wallace   Starlink   31 October 1993

SEE ALSO