Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Synthetic Division Algorithm

Algorithm for performing synthetic division to generate the tail-canceling polynomial $ B'(z)$ :

     int i,j;
     double *w=(double *)malloc((P+1)*sizeof(double));
/*** load the numerator coefficients for B(z) ***/
     for(i=0;i<P+1;i++){
          w[i]=b[i];
     }
/*** do synthetic division ***/
     for(i=0; i<=N; i++){
          factor=w[0];
          for(j=0;j<P;j++){
               w[j]=w[j+1]+factor*a[j];
          }
          w[P]=0;
/**** The remainder after the i-th step is in w[0..(P-1)] ***/
     }
/*** copy the result to the output array ***/
     for(i=0;i<P;i++) {
          bb[i]=w[i];
     }



Subsections
Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download HornModeling.pdf
Download HornModeling_2up.pdf
Download HornModeling_4up.pdf

``Horn Modeling'', by Julius O. Smith III, (From Lecture Overheads, Music 420).
Copyright © 2019-02-05 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]