XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Chebs()

Function Chebs ( C() As  Double,
N As  Long,
X As  Double,
Optional Info As  Long 
)

Evaluation of Chebyshev series

Purpose
This routine evaluates the Chebyshev series by using Clenshaw algorithm.
f(x) = c0/2 + ΣciTi(x) (i = 0 to n-1) (-1 <= x <= 1)
Note - Please be noted that there is factor of 2 difference in the first coefficient c0 depending on the definition of the Chebyshev series.
Returns
Double
The value of Chebyshev series.
Parameters
[in]C()Array C(LC - 1) (LC >= N)
Coefficients of Chebyshev series.
[in]NArgument n. (N > 0)
[in]XArgument x. (-1 <= X <= 1)
Note - The range of X will not be checked.
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument C() is invalid.
= -2: The argument N had an illegal value. (N <= 0)
= 1: Floating point range error.
Reference
boost/math/special_functions