Anonymous user
Horner's rule for polynomial evaluation: Difference between revisions
Horner's rule for polynomial evaluation (view source)
Revision as of 19:18, 8 April 2016
, 8 years ago→version 1: added a comment.
m (→version 1: added a comment.) |
m (→version 1: added a comment.) |
||
Line 1,468:
do j=deg-1 by -1 for deg; a=a*x+c.j /*apply Horner's rule to the equations.*/
end /*j*/
say /*display a blank line for readability.*/
say ' answer = ' a /*stick a fork in it, we're all done. */</lang>
'''output''' when the following is used for input: <tt> 3 -19 7 -4 6 </tt>
|