1 2 3 4 5 6 7
#include <math.h> #include <complex.h> double cabs(double complex z) { return hypot(creal(z), cimag(z)); }