The function may be called by the names: c06dcc, nag_sum_chebyshev or nag_sum_cheby_series.
c06dcc evaluates, at each point in a given set , the sum of a Chebyshev series of one of three forms according to the value of the parameter s:
where lies in the range . Here is the Chebyshev polynomial of order in , defined by where .
It is assumed that the independent variable in the interval was obtained from your original variable , a set of real numbers in the interval , by the linear transformation
The method used is based upon a three-term recurrence relation; for details see Clenshaw (1962).
The coefficients are normally generated by other functions, for example they may be those returned by the interpolation function e01aec (in vector a), by a least squares fitting function in Chapter E02, or as the solution of a boundary value problem by
Clenshaw C W (1962) Chebyshev Series for Mathematical Functions Mathematical tables HMSO
1: – const doubleInput
On entry: , the set of arguments of the series.
, for .
2: – IntegerInput
On entry: the number of evaluation points in .
3: – doubleInput
4: – doubleInput
On entry: the lower and upper end points respectively of the interval . The Chebyshev series representation is in terms of the normalized variable , where
5: – const doubleInput
On entry: must contain the coefficient of the Chebyshev series, for .
On exit: the Chebyshev series evaluated at the set of points .
9: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, .
On entry, .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
On entry, and .
On entry, element , and .
Constraint: , for all .
There may be a loss of significant figures due to cancellation between terms. However, provided that is not too large, c06dcc yields results which differ little from the best attainable for the available machine precision.