Hi Giorgio, Since the asmembler version of that algorithm can be extremely well optimized to the point of not being readable the C version may help you out. I picked it up from a very old Embedded Systems magazine which I no longer have. It's much faster than the Newton Raphson method. Cheers, John > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Giorgio De Nunzio > Sent: Saturday, March 30, 2002 11:49 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: 24 bit square root on a 16f84 > > > >>>>>>>>>>> John Dammeyer wrote > ... > > Thanks for your help, John! In point of fact I was looking > for a (already > optimized) asm routine, not C, but as it seems that I will > have to convert/adapt/write down the routine myself, your C > function may be useful! Thanks! Giorgio > > > >>>>>>>>>>> Scott Dattalo wrote: > > > Andy David (the author of the routine to which you refer), > based his > > algorithm on the 16-bit routine I wrote for the midrange family: > > Thanks, Scott! Sometime during the night I have found your > useful pages, and I was studying the routine. I admit that - > having so little time to play - I hoped to find a > ready-to-use 24 bit routine, but I am sitting down with pen > and paper and I am trying to figure out how things can be > adapted to my problem. > > > I'd like to say that extending the 16-bit routine to 24 bits is > > straight forward. Unfortunately, I don't like to lie. If I extended > > it, I'd probably go to 32-bits and optimize when needed for 24-bits. > > OK, thanks for your advice. > > Giorgio > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply > us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body