Question: Simple while loop problem: "Error, can't determine if expression is true or false, 0<.."

Hi,

So I have a simple while loop and keep receiving this error and have no idea how to fix it. I don't get why it works for the first few, and then the error starts. Here is my code and output:

Input:

restart;
n:=0:
x:=Pi/3;
m:=0:
total:=0:
while abs(1/2-total) > 10^(-8) do
k:=((-1)^(n/(2))*x^(n))/(n!):
total:= total +k;
evalf(total, 11);
print(%);
n:=+2;
end do:

OUTPUT:
1
- Pi
3
1.
0.45168864437
Error, cannot determine if this expression is true or false: 0 < -50000001/100000000+(1/18)*Pi^2

 

Why does it think i'm asking if something is greater than 0? Any help??

Please Wait...