Hi, I am re-sending this message because I received a message saying that it was rejected the first time. This is a second try. Martin Kirk Arizona State University mlk@asu.edu (602) 582-5718 ---------- Forwarded message ---------- Date: Wed, 25 Oct 1995 12:45:30 -0700 (MST) From: mlk4042@imap2.asu.edu To: PICLIST Subject: PIC Vector Math Hi, I want to do some simple vector math in a 16C57 and I am asking for suggestions to make the computations easy for the PIC. For instance, I would like to normalize a vector as follows: X = x(1)*i + x(2)*j x(1)*i x(2)*j X(norm) = --------------------- + --------------------- sqrt[x(1)^2 + x(2)^2] sqrt[x(1)^2 + x(2)^2] That is to say that I normalize by dividing each vector component by the magnitude of the original vector. What I need here is either a good approach to doing the square root function on a pic or some other approximation for finding vector magnitudes which is efficiently calculated. How about it picmasters? Martin Kirk Arizona State University mlk@asu.edu (602) 582-5718