/* * Written by Matthias Drochner . * Public domain. */ #include #include float cabsf(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 hypotf(x, y); }