code: public static double findMax( double[] u, int startU , int length ) {
          double max = -1;
  
          int index = startU*2;
          int stopIndex = (startU + length)*2;
          for( ; index < stopIndex;) {
              double real = u[index++];
              double img = u[index++];
  
              double val = real*real + img*img;
  
              if( val > max ) {
                  max = val;
              }
          }
  
          return Math.sqrt(max);
      }
docs: Returns the maximum magnitude of the complex numbers
  @param u Array of complex numbers
  @param startU first index to consider in u
  @param length Number of complex numebrs to consider
  @return magnitude