home *** CD-ROM | disk | FTP | other *** search
- plyevl(a,nd,x,ans)
-
- /*this function evaluates any single variable polynomial*/
- /*of the form a(1)*x**nd+a(2)*x**(nd-1)+... +a(nd)*x+a(nd+1)*/
-
- int nd;
- float a[],x,*ans;
-
- {
- register int i;
-
- *ans = a[0];
- if(nd != 0)
- {
- for(i = 0; i <= nd-1; i++)
- *ans = (*ans *x) + a[i+1];
- }
- }
-
-