docs: public static double computeTauGammaAndDivide(final int start, final int stop,
                                                    final double[] x, final double max,
                                                    Complex_F64 tau) {
  
          int index = start*2;
          double nx = 0;
          for (int i = start; i < stop; i++) {
              double realX = x[index++] /= max;
              double imagX = x[index++] /= max;
  
              nx += realX * realX + imagX * imagX;
          }
  
          nx = Math.sqrt(nx);
  
          double real_x0 = x[2*start];
          double imag_x0 = x[2*start+1];
          double mag_x0 = Math.sqrt(real_x0*real_x0 + imag_x0*imag_x0);
  
          // TODO Could stability be improved by computing theta so that this
          // special case doesn't need to be handled?
          if( mag_x0 == 0 ) {
              tau.real = nx;
              tau.imaginary = 0;
          } else {
              tau.real = real_x0 / mag_x0 * nx;
              tau.imaginary = imag_x0 / mag_x0 * nx;
          }
  
          double top,bottom;
  
          // if there is a chance they can cancel swap the sign
          // TODO not sure if this is right...
          double m0 = mag(real_x0+tau.real , imag_x0+tau.imaginary);
          double m1 = mag(real_x0-tau.real , imag_x0-tau.imaginary);
  
          // if ( real_x0*tau.real<0) { // This is the previous rule until the m0 m1 code came into play
          if ( m1 > m0 ) {
              tau.real = -tau.real;
              tau.imaginary = -tau.imaginary;
              top = nx * nx - nx *mag_x0;
              bottom = mag_x0*mag_x0 - 2.0* nx *mag_x0 + nx * nx;
          } else {
              top = nx * nx + nx *mag_x0;
              bottom = mag_x0*mag_x0 + 2.0* nx *mag_x0 + nx * nx;
          }
  
          return bottom/top; // gamma
      }