      subroutine leqt3f(a, m, n, np, b, idgt, wkarea, ier)
C...Translated by Pacific-Sierra Research VAST-90 2.06G2  17:20:10   6/12/01  
C...Switches: -p4 -yb
C   Changed the name from leqt2f (IMSL routine)
      implicit none
C-----------------------------------------------
C   D u m m y   A r g u m e n t s
C-----------------------------------------------
      integer m, n, np, idgt, ier
      real, dimension(np,np) :: a
      real, dimension(np) :: b
      real, dimension(1) :: wkarea
C-----------------------------------------------
C   L o c a l   P a r a m e t e r s
C-----------------------------------------------
      integer, parameter :: ndl = 900
      integer, parameter :: nd = ndl + 1
C-----------------------------------------------
C   L o c a l   V a r i a b l e s
C-----------------------------------------------
      integer, dimension(nd) :: indx
      integer :: jk, kl, npp, ll2, mm
      real :: sum, tmpmx, btmp, tmp, err
      double precision, dimension(nd,nd) :: ao
      double precision, dimension(nd) :: bo
      double precision, dimension(nd,nd) :: an
      double precision, dimension(nd) :: bn
      double precision :: d
C-----------------------------------------------
C   E x t e r n a l   F u n c t i o n s
C-----------------------------------------------
      real , EXTERNAL :: write
C-----------------------------------------------
c
c      real ao(901,901),bo(901)
c      real an(901,901),bn(901)
c
c     n had better be less than nd
c
      bo(:n) = b(:n)
      bn(:n) = b(:n)
      an(:n,:n) = a(:n,:n)
      ao(:n,:n) = a(:n,:n)
c
      npp = nd
      call ludcmp (an, n, npp, indx, d,)
      npp = nd
      call lubksb (an, n, npp, indx, bn)
      npp = nd
      call mprove (ao, an, n, npp, indx, bo, bn)
c
      do jk = 1, n
c         if (bn(jk) < 1.D-36) bn(jk) = 0.
c         if (bn(jk) > 1.D+36) bn(jk) = 1.E+36
         b(jk) = bn(jk)
      end do
c
      return 
      end subroutine leqt3f
 
