 f1Coef.a2 * f2Coef.a1, f1Coef.a2 * f2Coef.a2
        ];

        return {
          ff: numProduct, fb: denProduct
        }
      }

      // Find the magnitude of the root of the quadratic that has the maximum
      // magnitude.
      //
      // The quadratic is z^2 + a1 * z + a2 and we want the root z that has the
      // largest magnitude.
      function largestRootMagnitude(a1, a2) {
        let discriminant = a1 * a1 - 4 * a2;
        if (discriminant < 0) {
          // Complex roots:  -a1/2 +/- 