Trigonometry-related functions. More...
Functions | |
template<typename T , typename... Coeffs> | |
T | sp::polynomial (T x) |
Evaluate a polynomial with the given coefficients. More... | |
template<int N, typename T > | |
T | sp::chebyshev (T x) |
Compute the value of the Nth Chebyshev polynomial of first kind at x . More... | |
template<typename... Coeffs, typename T > | |
T | sp::chebyshevSeries (T x) |
Compute the value of the Chebyshev series described by the given coefficients at point x. More... | |
Trigonometry-related functions.
T sp::chebyshev | ( | T | x | ) |
Compute the value of the Nth Chebyshev polynomial of first kind at x
.
T sp::chebyshevSeries | ( | T | x | ) |
Compute the value of the Chebyshev series described by the given coefficients at point x.
The coefficients are represented as subtypes of std::ratio. These are converted to doubles and stuffed into a tuple to do the actual calculation.
T sp::polynomial | ( | T | x | ) |
Evaluate a polynomial with the given coefficients.
Evaluates the polynomial ax^0 + bx^1 + c x^2 + ...
where a
, b
, c
, ...
are the elemnts of Coeffs
.