Xaq wrote: > I need to solve this equation: > > sqrt(x^2+y^2)/(x*y) > > Both x, y, and the answer are all byte(0-255) values. > > .... > > In the equation above, the problem is in the fact that you must add > x^2 and y^2, right there you might have a number larger than 16 bits > (I am not sure how to handle double word mult and sqrt). Zach: Scott Dattalo and others have given you a lot of good information already... Have you solved your problem? If not, and if you want to do it by simply translating your equation directly into code, you can get over the hurdle you mentioned (x^2 + y^2 > 16 bits) by noting that sqrt(a*b) = sqrt(a) * sqrt(b). Therefore, you can simply divide the result of your "x^2 + y^2" calculation by 4, perform the square-root operation on this new number (now guaranteed to fit within 16 bits), then multiply the result of the square-root operation by 2. My apologies if anyone else has already pointed this out... I've been away from the list for a while. -Andy Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California http://www.geocities.com/SiliconValley/2499