Efficiency of algorithms
A considerably more efficient way of computing the above polynomial interpolant is:
pol=a(K);
for j=K-1:-1:1
pol=a(j)+pol*x;
end
Each step we have one add and one multiply
total of 2(K-1) operations.
Previous slide
Back to first slide
View graphic version