Searching \ for '[PIC:] square root functions in archive' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'square root functions in archive'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] square root functions in archive'
2003\11\20@234511 by Bryan Mumford

flavicon
face
Is anyone using the 24 bit or 32 bit square root functions in the
archives? After struggling with the syntax, I have it working with my
assembler, but I don't get the right answers. Perhaps I've bungled
the conversion.....

--

Bryan Mumford
Mumford Micro Systems
spam_OUTbryanTakeThisOuTspambmumford.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\11\21@005406 by Scott Dattalo

face
flavicon
face
On Thu, 20 Nov 2003, Bryan Mumford wrote:

> Is anyone using the 24 bit or 32 bit square root functions in the
> archives? After struggling with the syntax, I have it working with my
> assembler, but I don't get the right answers. Perhaps I've bungled
> the conversion.....

Hi Bryan,

I got your messages earlier... As you know, Andy David wrote those
routines and not me. However, his 32-bit routine is based upon my 16-bit
routine. Also, he targeted the 17C43. A few months someone asked about a
32-bit square root routine, so like Andy I ported my 16-bit routine. I'm
not sure if Andy's routine is correct or not, but I have tested mine and
it certainly works for several test cases (i.e. I haven't performed a
brute-forced check of all 2^32 inputs). I'm also hesitant to release the
code because it has no comments at all. If you're willing to live with
that then here it is:

http://www.dattalo.com/technical/software/pic/sqrt_32bit.asm

Scott

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2003\11\25@113807 by Andy David

flavicon
face
Hi Bryan,

The 24- and 32-bit routines of mine in the archive do work correctly as far
as I'm aware although, like Scott, I have not tested all cases. If you need
a 32-bit sqrt I recommend reading Scott's pages and developing code from
that, all the sqrt code I wrote was based on Scott's code and algorithm
descriptions. You might also want to have a look at John Power's work at
http://www.bcpl.net/~jpower/fastsqrt.pdf.


- Andy.

> {Original Message removed}

2003\11\25@120021 by Harold Hallikainen

face picon face
I've used the square root routines out of the archive successfully. One
thing to watch out for with any code out of the archive is what processor
core they were written for. There are several differences in flag results
between the 16 and 18 series cores. I've gotten messed up by these before.
So, look for any line of code that checks a flag and look at the few
instructions ahead of it. The code may count on some instruction not
affecting flags while the 18 instruction does affect flags. Look
especially at incf and decf instructions.

Good luck!

Harold

{Quote hidden}

>> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...