Tom was kind enough to do a timing analysis of the latest square root routine that I posted. Here are the results: Tom Van Baak wrote: > > Scott, > > In case you're interested I verified latest sqrt is bug free. > PTL > Minimum PIC cycles: 100 > Maximum PIC cycles: 122 > Average PIC cycles: 107.8 > Total: 65536 calls, 7063296 PIC cycles, 0.125 seconds host simulator > time. > PIC simulation rate: 56.51 Mips (226.03 MHz virtual PIC clock rate). > > Tom > The sqrt routine that Andy W. has, has the following timing specs: ; Executes in 113 cycles worst-case, 95 best-case, 103 cycles ; average over the range [0-65535]. It's memory requirements are: 28 words of program memory 4 bytes of RAM, including the two that hold the 16 bit input So overall, the routine I posted is on average about 5 cycles slower. On the other hand, you save a byte of RAM. Scott