Question: help with code

if anyone could please help me out with this code i would really appreciate it

> cuberootkj := proc (m, n)

local e, tol, x0, x1, x2, maxsteps, counter;

tol := 1/200000;

e := 1;  x1 := m;  x0 := n;

while tol < e do

x2 := (2/3)*x1+(1/3)*x0/x1^2;

e := x2-surd(x0, 3)

end do;

print("root"); x1

end proc;

 

i get this error message: Error, (in cuberootkj) cannot determine if this expression is true or false: 0 < 9399973/5400000-5^(1/3)

i am trying to get the x2 formula to loop until the value of x2 is less than 1/200000 different from the cubed root of n

 

 

Please Wait...