1:
y
=
0
y = 0
y
=
0
2:
for
i
=
n
i = n
i
=
n
downto
0
0
0
do
3:
y
=
a
i
+
x
⋅
y
y = a_i + x\cdot y
y
=
a
i
+
x
⋅
y
4:
end for