SSE2 optimization of magnitude calculation