Horner's rule for polynomial evaluation: Difference between revisions
Horner's rule for polynomial evaluation (view source)
Revision as of 00:56, 19 March 2020
, 4 years ago→{{header|Raku}}: Fix link and comments: Perl 6 --> Raku
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix link and comments: Perl 6 --> Raku) |
||
Line 1,576:
say horner( [ -19, 7, -4, 6 ], 3 );</lang>
A recursive version would spare us the need for reversing the list of coefficients. However, special care must be taken in order to write it, because the way
<lang perl6>multi horner(Numeric $c, $) { $c }
|