subroutine compute_a_ii(n, a, jcol, a_ii)
complex a(n,n), a_ii
complex(8) sum

!jcol =irow
j1 = jcol-1
sum =0.D0

	sum =0.
		do kcol =1, j1
		sum =sum +dcmplx( a(jcol, kcol) )*dcmplx( a(kcol, jcol) )
		enddo

a_ii =a(jcol, jcol) -sum

END
