code: protected void eigenvalue2by2( int x1 ) {
          double a = diag[x1];
          double b = off[x1];
          double c = diag[x1+1];
  
          // normalize to reduce overflow
          double absA = Math.abs(a);
          double absB = Math.abs(b);
          double absC = Math.abs(c);
  
          double scale = absA > absB ? absA : absB;
          if( absC > scale ) scale = absC;
  
          // see if it is a pathological case.  the diagonal must already be zero
          // and the eigenvalues are all zero.  so just return
          if( scale == 0 ) {
              off[x1] = 0;
              diag[x1] = 0;
              diag[x1+1] = 0;
              return;
          }
  
          a /= scale;
          b /= scale;
          c /= scale;
  
          eigenSmall.symm2x2_fast(a,b,c);
  
          off[x1] = 0;
          diag[x1] = scale*eigenSmall.value0.real;
          diag[x1+1] = scale*eigenSmall.value1.real;
      }
docs: Computes the eigenvalue of the 2 by 2 matrix.