next up previous contents
Next: Boolean Logic Up: Wester's test suite Previous: Programming

Translation

Problem :define the polynomial .

>> p:= poly(_plus(a.i * x^i $ i=1..5), [x]);

                 /         2       3       4       5         \
            poly \ x a1 + x  a2 + x  a3 + x  a4 + x  a5, [x] /

Problem :apply Horner's rule to the above polynomial.

>> p(x);

                 x (a1 + x (a2 + x (a3 + x (a4 + x a5))))



Andre Heck
Sun Apr 23 10:32:10 MDT 1995