float dist=0;
spx_word32_t dist=0;
void vq_nbest_sign(spx_sig_t *in, spx_sig_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, float *best_dist){   int i,j,k, sign, used;   used=0;   for (i=0;i<entries;i++)   {      float dist=0;      for (j=0;j<len;j++)         dist -= in[j]**codebook++;      if (dist>0)      {         sign=1;         dist=-dist;      } else      {         sign=0;      }      dist += .5*E[i];      if (i<N || dist<best_dist[N-1])      {         for (k=N-1; (k >= 1) && (k > used || dist < best_dist[k-1]); k--)         {            best_dist[k]=best_dist[k-1];            nbest[k] = nbest[k-1];         }         best_dist[k]=dist;         nbest[k]=i;         used++;         if (sign)            nbest[k]+=entries;      }   }}