docs: private void tred2() {
      // This is derived from the Algol procedures tred2 by
      // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
      // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
      // Fortran subroutine in EISPACK.
      System.arraycopy(V[n - 1], 0, d, 0, n);
  
      // Householder reduction to tridiagonal form.
      for(int i = n - 1; i > 0; i--) {
        double[] V_i = V[i], V_im1 = V[i - 1];
        // Scale to avoid under/overflow.
        double scale = 0.;
        for(int k = 0; k < i; k++) {
          scale += abs(d[k]);
        }
        if(scale < Double.MIN_NORMAL) {
          e[i] = d[i - 1];
          for(int j = 0; j < i; j++) {
            d[j] = V_im1[j];
            V_i[j] = V[j][i] = 0.;
          }
          d[i] = 0;
          continue;
        }
        // Generate Householder vector.
        double h = 0.;
        for(int k = 0; k < i; k++) {
          double dk = d[k] /= scale;
          h += dk * dk;
        }
        {
          double f = d[i - 1], g = FastMath.sqrt(h);
          g = (f > 0) ? -g : g;
          e[i] = scale * g;
          h -= f * g;
          d[i - 1] = f - g;
          Arrays.fill(e, 0, i, 0.);
        }
  
        // Apply similarity transformation to remaining columns.
        for(int j = 0; j < i; j++) {
          final double[] Vj = V[j];
          double dj = Vj[i] = d[j], ej = e[j] + Vj[j] * dj;
          for(int k = j + 1; k <= i - 1; k++) {
            final double Vkj = V[k][j];
            ej += Vkj * d[k];
            e[k] += Vkj * dj;
          }
          e[j] = ej;
        }
        double sum = 0.;
        for(int j = 0; j < i; j++) {
          sum += (e[j] /= h) * d[j];
        }
        double hh = sum / (h + h);
        for(int j = 0; j < i; j++) {
          e[j] -= hh * d[j];
        }
        for(int j = 0; j < i; j++) {
          double dj = d[j], ej = e[j];
          for(int k = j; k <= i - 1; k++) {
            V[k][j] -= (dj * e[k] + ej * d[k]);
          }
          d[j] = V_im1[j];
          V_i[j] = 0.;
        }
        d[i] = h;
      }
  
      // Accumulate transformations.
      tred2AccumulateTransformations();
      System.arraycopy(V[n - 1], 0, d, 0, n);
      Arrays.fill(V[n - 1], 0.);
      V[n - 1][n - 1] = 1.;
      e[0] = 0.;
    }