code: public static void lsp_stability(
  	 float  buf[]           /*in/out: LSP parameters  */
  	)
  	{
  	   int   j;
  	   float diff, tmp;
  
  
  	   for(j=0; j<LD8KConstants.M-1; j++) {
  	      diff = buf[j+1] - buf[j];
  	      if( diff < (float)0. ) {
  	         tmp      = buf[j+1];
  	         buf[j+1] = buf[j];
  	         buf[j]   = tmp;
  	      }
  	   }
  
  	   if( buf[0] < LD8KConstants.L_LIMIT ) {
  	      buf[0] = LD8KConstants.L_LIMIT;
  	      System.out.println("warning LSP Low \n");
  	   }
  	   for(j=0; j<LD8KConstants.M-1; j++) {
  	      diff = buf[j+1] - buf[j];
  	      if( diff < LD8KConstants.GAP3 ) {
  	        buf[j+1] = buf[j]+ LD8KConstants.GAP3;
  	      }
  	   }
  	   if( buf[LD8KConstants.M-1] > LD8KConstants.M_LIMIT ) {
  	      buf[LD8KConstants.M-1] = LD8KConstants.M_LIMIT;
  	      System.out.println("warning LSP High \n");
  	   }
  	   return;
  	}
docs: /*----------------------------------------------------------------------------
  lsp_stability - check stability of lsp coefficients
  ----------------------------------------------------------------------------