subroutine tslz1(a1,a2,b,x,c1,c2,m)
integer m
double complex a1(m),a2(1),b(m),x(m),c1(1),c2(1)
c
c tslz1 solves the double complex linear system
c a * x = b
c with the t - matrix a .
c
c on entry
c
c a1 double complex(m)
c the first row of the t - matrix a .
c on return a1 is unaltered .
c
c a2 double complex(m - 1)
c the first column of the t - matrix a
c beginning with the second element .
c on return a2 is unaltered .
c
c b double complex(m)
c the right hand side vector .
c on return b is unaltered .
c
c c1 double complex(m - 1)
c a work vector .
c
c c2 double complex(m - 1)
c a work vector .
c
c m integer
c the order of the matrix a .
c
c on return
c
c x double complex(m)
c the solution vector. x may coincide with b .
c
c toeplitz package. this version dated 07/23/82 .
c
c internal variables
c
integer i1,i2,n,n1,n2
double complex r1,r2,r3,r5,r6
c
c solve the system with the principal minor of order 1 .
c
r1 = a1(1)
x(1) = b(1)/r1
if (m .eq. 1) go to 80
c
c recurrent process for solving the system
c with the t - matrix for n = 2, m .
c
do 70 n = 2, m
c
c compute multiples of the first and last columns of
c the inverse of the principal minor of order n .
c
n1 = n - 1
n2 = n - 2
r5 = a2(n1)
r6 = a1(n)
if (n .eq. 2) go to 20
c1(n1) = r2
do 10 i1 = 1, n2
i2 = n - i1
r5 = r5 + a2(i1)*c1(i2)
r6 = r6 + a1(i1+1)*c2(i1)
10 continue
20 continue
r2 = -r5/r1
r3 = -r6/r1
r1 = r1 + r5*r3
if (n .eq. 2) go to 40
r6 = c2(1)
c2(n1) = (0.0d0,0.0d0)
do 30 i1 = 2, n1
r5 = c2(i1)
c2(i1) = c1(i1)*r3 + r6
c1(i1) = c1(i1) + r6*r2
r6 = r5
30 continue
40 continue
c2(1) = r3
c
c compute the solution of the system with the
c principal minor of order n .
c
r5 = (0.0d0,0.0d0)
do 50 i1 = 1, n1
i2 = n - i1
r5 = r5 + a2(i1)*x(i2)
50 continue
r6 = (b(n) - r5)/r1
do 60 i1 = 1, n1
x(i1) = x(i1) + c2(i1)*r6
60 continue
x(n) = r6
70 continue
80 continue
return
end