From: "Rob van der Heij" <rvdh...@gmail.com> Sent: Wednesday, October 23, 2013 8:12 PM
Since the machine architectures that came to mind all have this 3-state result after comparison, I expected the compiler to take advantage of it when I write something like if ( j < k ) m = -1; else if (j > k) m = 1; else m = 0; return m;
It is sufficient to write: return (sign(j-k) );