public double Abs() { return MathUtils.Hypot(real, imag); }
public static double Abs(Complex x) { double res = x.Abs(); if (double.IsInfinity(res) && !double.IsInfinity(x.Real) && !double.IsInfinity(x.Imaginary())) { throw PythonOps.OverflowError("absolute value too large"); } return(res); }