On Aug 22, 2005, at 8:57 AM, Lindy Mayfield wrote: >> N^2 = sum of the first N-odd integers > > I believe Nikolai may have code this up for a PIC back in 2000. > Yep. Nicely summarized here: http://www.piclist.com/techref/microchip/math/sqrt/index.htm ;********************************************************************** ;SMALL 8 BIT SQUARE ROOT ; ;Author: Nikolai Golovchenko ;Idea: Scott Dattalo ;"Hint: n^2 = sum of the first n odd integers.(e.g 9 = 3*3 = 1 + 3 + 5)" ;Date: February 16, 2000 ; ;Input and output in ACCB0 ;ROM - 9 ;RAM - 1 ;Timing - 12..87 cycles including call and return ;********************************************************************** -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist