On Tue, 7 Mar 2000, Sean Breheny wrote: > Also, integer square root routines are very east to write. Two common algos > are Newton's method applied to the equation x^2-y=0 to solve for x given y, > and the CORDIC square root method. Both should be only about 100 lines or > so in PIC assembly. Those may be easy to write, but they're slow. This one was hard to write but it's fast: http://www.dattalo.com/technical/software/pic/picsqrt.html (There are actually two there). Andy David has versions for taking the square of numbers bigger than 16-bits, but I don't have those readily available. Scott