cabs method

double cabs(
  1. complex z
)

Computes the complex absolute value (magnitude) of z.

Implementation

double cabs(complex z) => math.sqrt(z.real * z.real + z.imag * z.imag);