nn  = zeros(1,4);
Pia = nn;
j = 0;
for n  = [10^5 10^6 10^7 10^8]
    j = j+1;
    nn(j) = n;
    Pia(j) = Pi2(n);
end
loglog(nn, abs(Pia-pi)/pi, '*:', 'LineWidth', 3), grid