f(x) = a0+a1*x+a2*x2+...+an-1*xn-1+an*xn
=a0+x(a1+x(a2+...+x(an-1+anx)...))
算法:
Poly =0; for(i = n;i >=0 ;i--) Poly = x * Poly + A[i];
时间: 2024-10-10 19:43:09
f(x) = a0+a1*x+a2*x2+...+an-1*xn-1+an*xn
=a0+x(a1+x(a2+...+x(an-1+anx)...))
算法:
Poly =0; for(i = n;i >=0 ;i--) Poly = x * Poly + A[i];