34 template<
size_t N,
typename T>
35 constexpr T
Horner(
const T* c,
const T&
x)
37 if constexpr (N == 0) {
41 return Horner<N - 1, T>(c,
x) *
x + c[N];
74 template<
size_t N,
typename T,
typename... Args>
75 constexpr T
Horner(
const T* c,
const T& x1, Args... xI)
77 if constexpr (N == 0) {
81 constexpr size_t M =
sizeof...(Args) + 1;
constexpr size_t NofPolCoefficients(size_t N, size_t M)
Number of coefficients in a polynomial.
constexpr T Horner(const T *c, const T &x)
Horner's scheme for a 1D-polynomial estimation.