32 bit integer by Andy David and
Scott Dattalo Calculates the square
root of a thirty-two bit number using the binary restoring method. Takes
between 392 and 439 cycles (incl. call and return). for the 17c43. (only
uses rotates, subtracts, and compares -- no multiplies or divides).

"Microchip
app note TB040: Fast Integer Square Root" by Ross M. Fosler gives code
for a sqrt() routine for the PIC18Cxx2. (Uses the hardware multiplier in
the PIC18Cxx2). This sqrt() routine returns the 16 bit result for a 32 bit
integer X in 1002 cycles (max). If the top 2 bytes are zero (it's a 16 bit
integer X), this sqrt() returns the byte result in 149 cycles (max).
After this was written, the above much faster routines were developed.

After you find an appropriate page, you are invited to
your
to this massmind site! (posts will be visible only to you before review)
Just type in the box and press the Post button.
(HTML welcomed, but not the <A tag:
Instead, use the link box to link to another page.
A tutorial is availableMembers can
login
to post directly, become page editors, and be credited for their posts.

Link? Put it here:
if you want a response,
please enter your email address:
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.