! Inmultire in stocaj compact
subroutine compact_mul(n, s, a)

real(4) s(n*(n+1)/2)
real(4) x(n,n), a(n,n)


! Form x:
x =0.

do i =1,n
do j =i,n
lij =loca(i,j)
x(i,j) =s(lij)
enddo
enddo

a =matmul(transpose(x), x)

END





