Speclib  0.1.2
The library for writing better CUDA libraries
Polynomials

Trigonometry-related functions. More...

Functions

template<typename T , typename... Coeffs>
sp::polynomial (T x)
 Evaluate a polynomial with the given coefficients. More...
 
template<int N, typename T >
sp::chebyshev (T x)
 Compute the value of the Nth Chebyshev polynomial of first kind at x. More...
 
template<typename... Coeffs, typename T >
sp::chebyshevSeries (T x)
 Compute the value of the Chebyshev series described by the given coefficients at point x. More...
 

Detailed Description

Trigonometry-related functions.

Function Documentation

◆ chebyshev()

template<int N, typename T >
T sp::chebyshev ( x)

Compute the value of the Nth Chebyshev polynomial of first kind at x.

◆ chebyshevSeries()

template<typename... Coeffs, typename T >
T sp::chebyshevSeries ( 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.

◆ polynomial()

template<typename T , typename... Coeffs>
T sp::polynomial ( 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.