How to resolve the algorithm Horner's rule for polynomial evaluation step by step in the FunL programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Horner's rule for polynomial evaluation step by step in the FunL programming language
Table of Contents
Problem Statement
A fast scheme for evaluating a polynomial such as: when is to arrange the computation as follows: And compute the result from the innermost brackets outwards as in this pseudocode: Task Description Cf. Formal power series
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Horner's rule for polynomial evaluation step by step in the FunL programming language
Source code in the funl programming language
import lists.foldr
def horner( poly, x ) = foldr( \a, b -> a + b*x, 0, poly )
println( horner([-19, 7, -4, 6], 3) )
You may also check:How to resolve the algorithm Index finite lists of positive integers step by step in the Haskell programming language
You may also check:How to resolve the algorithm Word frequency step by step in the C programming language
You may also check:How to resolve the algorithm XML/Input step by step in the Delphi programming language
You may also check:How to resolve the algorithm Loops/Foreach step by step in the Scheme programming language
You may also check:How to resolve the algorithm User input/Graphical step by step in the C++ programming language