Antkeeper  0.0.1
Namespaces | Functions
math::polynomial Namespace Reference

Polynomial functions. More...

Namespaces

 chebyshev
 Chebychev polynomials.
 

Functions

template<class InputIt , class T >
constexpr T horner (InputIt first, InputIt last, T x)
 Evaluates a polynomial using Horner's method. More...
 

Detailed Description

Polynomial functions.

Function Documentation

◆ horner()

template<class InputIt , class T >
constexpr T math::polynomial::horner ( InputIt  first,
InputIt  last,
x 
)
constexpr

Evaluates a polynomial using Horner's method.

Parameters
first,lastRange of polynomial coefficients, in descending order of degree.
xVariable value.
Returns
Evaluation of P(x).
See also
https://en.wikipedia.org/wiki/Horner%27s_method

Definition at line 41 of file polynomial.hpp.