code: protected void createBulge( int x1 , double p , double scale , boolean byAngle ) {
          double b11 = diag[x1];
          double b12 = off[x1];
          double b22 = diag[x1+1];
  
          if( byAngle ) {
              c = Math.cos(p);
              s = Math.sin(p);
          } else {
              // normalize to improve resistance to overflow/underflow
              double u1 = (b11/scale)*(b11/scale)-p;
              double u2 = (b12/scale)*(b11/scale);
  
              double gamma = Math.sqrt(u1*u1 + u2*u2);
  
              c = u1/gamma;
              s = u2/gamma;
          }
  
          // multiply the rotator on the top left.
          diag[x1] = b11*c + b12*s;
          off[x1] = b12*c - b11*s;
          diag[x1+1] = b22*c;
          bulge = b22*s;
  
  //        SimpleMatrix Q = createQ(x1, c, s, false);
  //        B=B.mult(Q);
  //
  //        B.print();
  //        printMatrix();
  //        System.out.println("  bulge = "+bulge);
  
          if( Vt != null ) {
              updateRotator(Vt,x1,x1+1,c,s);
  
  //            SimpleMatrix.wrap(Ut).mult(B).mult(SimpleMatrix.wrap(Vt).transpose()).print();
  //            printMatrix();
  //            System.out.println("bulge = "+bulge);
  //            System.out.println();
          }
      }
docs: Performs a similar transform on B<sup>T</sup>B-pI