Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm implementing a dot unit in an electrical design, but I'm only interested in the sign of the result and not the magnitude. Is there a way to reduce the number of mathematical operations (mainly the multiplication operations) to get just the sign faster and with less space?

Right now I'm calculating it using: (a1,b1,c1).(a2,b2,c2)=a1.a2+b1.b2+c1.c2.

share|improve this question
2  
Anything special about your vectors? –  J. M. May 3 '11 at 13:56

1 Answer 1

up vote 2 down vote accepted

Not really.

Compare

(10,20,29).(40,10,-20) = +20  
(10,20,30).(40,10,-20) = 0  
(10,20,31).(40,10,-20) = -20 

and there are no obvious shortcuts to find the signs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.