PolynomialValue
(FUN)
FUNCTION PolynomialValue : LREAL
This function block evaluates a given polynomial of arbitrary degree, \(p(x) = c_{n}x^{n} + c_{n-1}x^{n-1} + \dots + c_{1}x + c_{0}\) with \(c_{i} \in \mathbb{R}, n \in \mathbb{N_{0}}\) at a point \(x \in \mathbb{R}\) by use of the Horner scheme.
- InOut:
Scope
Name
Type
Comment
Return
PolynomialValue
LREAL
Input
siDegree
SINT
degree of polynomial
plr
POINTER TO LREAL
pointer to Array of polynomial coefficients; at first there is the coefficient of the monomial of highest degree (corresponds to \(c_{n}\) in the formula)
lrValue
LREAL
point \(x\), where polynomial has to be evaluated