function sum=F4X(x)
    %%Griewank function
     m=length(x);
     sum4=0;
     prod1=1;
     for j=1:m
         sum4=sum4+(x(j)*x(j)/4000);
     end
     for j=1:m
         prod1=prod1*cos(x(j)/sqrt(j));
     end
     sum=sum4-prod1+1;
endfunction