Category Archives: Math

The conjugate function for clang 3.4.1 on FreeBSD fails?

Dealing with the conjugate of complex numbers brought me some linker failures for clang 3.4.1 on FreeBSD 11 CURRENT amd64:

vanja@current:/tmp % cat konjugat.c
#include <complex.h>
#include <stdio.h>

int main(void)
double complex kpx = 1.0 + 3.0*I;
double complex konjugat = conj(kpx);
printf(“Kompleksni broj je %.2f%+.2fi\n”, creal(kpx), cimag(kpx));
printf(“Konjugat od kpx je %.2f%+.2fi\n”, creal(konjugat) ,cimag(konjugat));
return 0;

Continue reading