home *** CD-ROM | disk | FTP | other *** search
- # This routine evaluates polynomials p of degree m.
- # Coefficients of polynomial are stored in an array of size m+1, say c, s.t.
- #
- # p(x) = c[1] + c[2]*x + c[3]*x^2 + ... + c[m+1]*x^m
- #
- # nb: routines assume array base is 1
- # mws, February 1992
-
- func epoly(@c, x) = {
- local n,j,ss
- n = sizeof(c)
-
- ss = c[n]
- for (j = n-1; j >= 1; j -= 1)
- ss = ss*x+c[j]
- }
-