On Jan 13, 4:59 am, Terje Mathisen <"terje.mathisen at tmsw.no"@giganews.com> wrote: > I'll second James' suggestion about SSE2!
I'm open to using SSE2. The only reason I used x87 is that I started with the assembly code that g++ generated. By default, it generates x87 instructions. But I'm certainly willing to try with SSE2 instructions. > Anyway, it seem that what you are trying to do is to take the > difference between two angles and then make sure that said > difference will be in the [-pi .. pi> range, right? That's it exactly. It's such a simple thing, but I can't come up with a really elegant way to do it. The code generated by g++ involves a jump. But I think this should be possible without a jump by using a conditional move. > Anyway, trying your original algorithm: I'll give your implementation a try. A big part of the challenge (for me, at least) is figuring out how to get this in to a form that g++ will understand. I don't really care where or how this is implemented, but I need to be able to call it from C++. And it really should be inline, as well. Otherwise, all the efficiency gained by tweaking the assembly will be lost. :-p Thanks, Bill _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org https://lists.gnu.org/mailman/listinfo/help-gplusplus