clear
close
m = 1000000;
 tic;
 numcalcs =100;
%parfor p=1:numcalcs
for p = 1:numcalcs
   z = rand(m, 1) + i*rand(m, 1);
   c(p) = sum(abs(z) < 1);
end
%k = gplus(c);
k=sum(c);
format long
piapprox = 4*k/(m*numcalcs)
time1=toc
