code: public static double normInf(double[] x) {
          int n = x.length;
  
          double f = Math.abs(x[0]);
          for (int i = 1; i < n; i++) {
              f = Math.max(f, Math.abs(x[i]));
          }
  
          return f;
      }
docs: L-infinity vector norm. Maximum absolute value.