SUBROUTINE MFSD ( A, N, EPS, IER )

Argument Definitions (+ indicates altered content)
DOUBLE PRECISION  +A(*),       EPS
INTEGER           +IER,        N
Description
subroutine mfsd 
 
purpose 
   factor a given symmetric positive definite matrix 
 
usage 
   call mfsd(a,n,eps,ier) 
 
description of parameters 
   a      - upper triangular part of the given symmetric 
            positive definite n by n coefficient matrix. 
            on return a contains the resultant upper 
            triangular matrix. 
   n      - the number of rows (columns) in given matrix. 
   eps    - an input constant which is used as relative 
            tolerance for test on loss of significance. 
   ier    - resulting error parameter coded as follows 
            ier=0  - no error 
            ier=-1 - no result because of wrong input parame- 
                     ter n or because some radicand is non- 
                     positive (matrix a is not positive 
                     definite, possibly due to loss of signi- 
                     ficance) 
            ier=k  - warning which indicates loss of signifi- 
                     cance. the radicand formed at factoriza- 
                     tion step k+1 was still positive but no 
                     longer greater than abs(eps*a(k+1,k+1)). 
 
remarks 
   the upper triangular part of given matrix is assumed to be 
   stored columnwise in n*(n+1)/2 successive storage locations. 
   in the same storage locations the resulting upper triangu- 
   lar matrix is stored columnwise too. 
   the procedure gives results if n is greater than 0 and all 
   calculated radicands are positive. 
   the product of returned diagonal terms is equal to the 
   square-root of the determinant of the given matrix. 
 
subroutines and function subprograms required 
   none 
 
method 
   solution is done using the square-root method of cholesky. 
   the given matrix is represented as product of two triangular 
   matrices, where the left hand factor is the transpose of 
   the returned right hand factor.
Source file:mfsd.f
Intrinsic Functions Called
DOUBLE PRECISION   DABS,       DSQRT
Local Variables (+ indicates altered content)
DOUBLE PRECISION  +DPIV,      +DSUM,      +TOL
INTEGER           +I,         +IND,       +K,         +KPIV
INTEGER           +L,         +LANF,      +LEND,      +LIND