code: private static void ortbnd(double[] alf, double[] bet, double[] eta, double[] oldeta, int step, double rnm, double eps) {
          if (step < 1) {
              return;
          }
  
          if (0 != rnm) {
              if (step > 1) {
                  oldeta[0] = (bet[1] * eta[1] + (alf[0] - alf[step]) * eta[0] - bet[step] * oldeta[0]) / rnm + eps;
              }
  
              for (int i = 1; i <= step - 2; i++) {
                  oldeta[i] = (bet[i + 1] * eta[i + 1] + (alf[i] - alf[step]) * eta[i] + bet[i] * eta[i - 1] - bet[step] * oldeta[i]) / rnm + eps;
              }
          }
  
          oldeta[step - 1] = eps;
          for (int i = 0; i < step; i++) {
              double swap = eta[i];
              eta[i] = oldeta[i];
              oldeta[i] = swap;
          }
  
          eta[step] = eps;
      }
docs: Update the eta recurrence.
  @param alf      array to store diagonal of the tridiagonal matrix T
  @param bet      array to store off-diagonal of T
  @param eta      on input, orthogonality estimate of Lanczos vectors at step j.
  On output, orthogonality estimate of Lanczos vectors at step j+1 .
  @param oldeta   on input, orthogonality estimate of Lanczos vectors at step j-1
  On output orthogonality estimate of Lanczos vectors at step j
  @param step     dimension of T
  @param rnm      norm of the next residual vector
  @param eps      roundoff estimate for dot product of two unit vectors