What C macro is in your opinion is the most useful? I have found the following one, which I use to do vector arithmetic in C:
#define v3_op_v3(x, op, y, z) {z[0]=x[0] op y[0]; \
z[1]=x[1] op y[1]; \
z[2]=x[2] op y[2];}
It works like that:
v3_op_v3(vectorA, +, vectorB, vectorC);
v3_op_v3(vectorE, *, vectorF, vectorJ);
...
This one is from linux kernel (gcc specific):
Another missing from other answers:
Just the standard ones:
but there's nothing too spiffy there.
Save yourself some error prone counting
Checking whether a floating point x is Not A Number:
Pack bytes,words,dwords into words,dwords and qwords:
Parenthesizing arguments it's always a good practice to avoid side-effects on expansion.
This one is awesome:
And I use it like: