Yes.
Here is the code for ending the loop
when |n/x*x - 1| < 0.00001
.
## $f0 --- n ## $f1 --- 1.0 ## $f2 --- 2.0 ## $f3 --- x : current approx. ## $f4 --- x' : next approx. ## $f8 --- temp ## $f10 --- small value mul.s $f8,$f3,$f3 # x^2 div.s $f8,$f0,$f8 # n/x^2 sub.s $f8,$f8,$f1 # n/x^2 - 1.0 abs.s $f8,$f8 # |n/x^2 - 1.0| c.lt.s $f8,$f10 # |x^2 - n| < small ? bc1t done # yes: done j loop done: