1:y=0y = 0

2:for i=ni = n downto 00 do

3:y=ai+xyy = a_i + x\cdot y

4:end for