home *** CD-ROM | disk | FTP | other *** search
- plymul(a,b,nda,ndb,c,ndc)
-
-
- /*this function multiplies any two polynomials of the same*/
- /*single variable where both polynomials are of the form*/
- /*a(1)*x**nda + a(2)*x**(nda-1) + ... + a(nda)*x + a(nda+1).*/
-
- int nda,ndb,*ndc;
- float a[],b[],c[];
-
- {
- int i,j,ipj,n;
-
- *ndc = nda + ndb;
- n = *ndc;
-
- for(i = 0;i <=n; i++)
- c[i] = 0.0;
-
- for(i = 0;i <= nda; i++)
- for(j = 0; j <= ndb; j++)
- {
- ipj = i + j;
- c[ipj] += a[i]*b[j];
- }
- }
-
-
-
-
-