SUNY Geneseo Department of Mathematics
Thursday, September 10
Math 303
Fall 2015
Prof. Doug Baldwin
poly( a0..n, x )
p = 0
for i = 0 to n
power = 1
for j = 1 to i
power = power * x
end for j
p = p + ai * power
end for i
return p
power = power * x
is done a different
number of times on each iteration of the i
looppoly2( a0..n, x )
p = 0
for i = n down to 0
p = p * x + ai
end
return p