#include // for cabs, cimag, creal, complex #include // for hypot double cabs(double complex z) { return hypot(creal(z), cimag(z)); }