/* * Written by Matthias Drochner . * Public domain. */ #include #include float cargf(float complex z) { union C { float complex c; float x[2]; } c = { .c = z}; float x = c.x[0]; float y = c.x[1]; return atan2f(y, x); }