no matter s>0.01 or not, the loop will execute one time INCREMENTING n and executing x=x+s..
s = 1.0/(1 + n * n);
will be executed one time no matter s>0.01 or not BUT! increment in n and
x=x+s will be done only if s>0.01;
you should better look at your objective(what u want to do)
either make x and n dependent on s>0.01 condition the first time or not...