! Calculeaza y din: L*y =b; L =S_T
! Prin substitutie inainte
! Matricea L - data de Cholesky
! 'y' stocat in 'b'
!
subroutine forward(n, s,b)
!common n
real(4) s(n*(n+1)/2), b(n)
real(4) ski, sii

! i=1:
b(1) =b(1)/s(1)

A_DO: do i =2, n
yi =0.
	do k=1,i-1
	yk =b(k)
	ski =s(loca(k,i))
	yi =yi +ski*yk
	enddo
yi =b(i) -yi

sii =s(loca(i,i))
yi =yi/sii
b(i) =yi

ENDDO A_DO


END subroutine forward
