XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ chebs()

double chebs ( double  c[],
size_t  n,
double  x 
)

Evaluation of Chebyshev series

Purpose
chebs evaluates the Chebyshev series by using Clenshaw algorithm.
f(x) = c0/2 + ΣciTi(x) (i = 0 to n-1) (-1 <= x <= 1)
Note that there is factor of 2 difference in the first coefficient c0 depending on the definition of the Chebyshev series.
Returns
The value of Chebyshev series.
Parameters
[in]c[]Array c[lc] (lc >= n)
Coefficients of Chebyshev series.
[in]nArgument n. (n >= 1)
[in]xArgument x.
Error handling
  • If n <= 0, domain error (EDOM) occurs.
  • Range error (ERANGE) may occur.
Note
  • If x < -1 or x > 1, this routine is much slower and recommended not to be used.
Reference
boost/math/special_functions