Include:
Prototype: double cabs(struct complex z);
Returns: the absolute value if successful, or HUGE_VAL on overflow.
errno: ERANGE
See also: abs, fabs, labs
The cabs function calculates the absolute value of a complex number, which
must be a structure of type complex. A call to cabs is equivalent to the
following:
sqrt(z.x*z.x + z.y*z.y)
Return Value
On overflow, cabs calls matherr, returns HUGE_VAL, and sets errno to ERANGE.