Question: converting a Vector to a List gives fake result !

Hi,

Please take a look on this problem I have about converting a Vector to a List. At the end if the program, the list F contains the elements of the Vector Y, but not in the good order.
It gives a result which is correct for a small size of Vector, but not for h = 1000 !

 

#differents values of h are tried h := 100 and h:=1000
h:=1000;

E := Vector[1..h];
for u from 1 to h do
Y[u] := u;
end do;
for z from 1 to h do
   E[z] := sum('Y[j]', 'j'=1..z);
 end do;
 F := convert(E,list);


thanks for helping !

Please Wait...