|
inlineconstexpr |
Implement the horner scheme to evaluate polynomials/.
If \((a_i)_{0\le i\le n-1}\) denotes the coefficients of the polynomial by decreasing power order, the Horner scheme evaluates the polynom \(p\) at \(x\) by : \(\displaystyle p(x) = (((a_0x+a_1)x+ ... )x + a_{n-1})\)
Defined in header
Parameters
x
: real floating argument.coefs...
: real floating arguments. The coefficients by decreasing power orderr
: range containing The coefficients by decreasing power order.Return value
The value of the polynom at x
is returned.
Notes
If the coefficients are simd values of cardinal N, this means you simultaneously compute the values of N polynomials.
If d denotes one of these modifiers, the expression d(eve::horner)(...)
computes the result using d(eve::fma)
instead of eve::fma
in internal computations.
This is intended to insure more accurate computations where needed. This has no cost if the system has hard wired fma but is very expansive if it is not the case.