3 // nice, but internally ugly:
4 // macros generate gratuitous code the compiler has to optimize away
5 double complex conj(double complex z)
7 return cpack(creal(z), -cimag(z));
11 // always works, but ugly union
12 double complex conj(double complex z) {
13 union dcomplex u = {z};
19 // reasonable, needs clever compiler that understands *I
20 double complex conj(double complex z) {
21 return creal(z) - cimag(z)*I;