Question: An "too many levels of recursion" i cannot solve

Hello :),

Here is some code, and it returns an error : "too many levels of recursion".

X := 0;
while A <> 1
do
S := solve({X = .15*p*(1/2), L-X = .15*q*(1/2)}, [p, q]);
p := S[1];
q := S[2];
if (frac(p) <= 0.1e-1 AND frac(q) <= 0.1e-1) then A := 1 else X := X+0.1e-2 fi;
od;

Maybe, we can't do that this way, but i don't see easier way for the machine...

Thank you for your help !

Please Wait...