extend cmath (some of the functions are dummy)
[libm] / src / cmath / conj.c
index 8720feb..4aceea7 100644 (file)
@@ -1,23 +1,6 @@
 #include "libm.h"
 
-// nice, but internally ugly:
-// macros generate gratuitous code the compiler has to optimize away
 double complex conj(double complex z)
 {
        return cpack(creal(z), -cimag(z));
 }
-
-/*
-// always works, but ugly union
-double complex conj(double complex z) {
-       union dcomplex u = {z};
-
-       u.a[1] = -u.a[1];
-       return u.z;
-}
-
-// reasonable, needs clever compiler that understands *I
-double complex conj(double complex z) {
-       return creal(z) - cimag(z)*I;
-}
-*/