NAG Library Routine Document
C06DBF returns the value of the sum of a Chebyshev series through the routine name.
|FUNCTION C06DBF (
||X, C, N, S)
|REAL (KIND=nag_wp) C06DBF
C06DBF evaluates the sum of a Chebyshev series of one of three forms according to the value of the parameter S
lies in the range
is the Chebyshev polynomial of order
, defined by
The method used is based upon a three-term recurrence relation; for details see Clenshaw (1962)
Clenshaw C W (1962) Chebyshev Series for Mathematical Functions Mathematical tables HMSO
- 1: X – REAL (KIND=nag_wp)Input
On entry: the argument of the series.
- 2: C(N) – REAL (KIND=nag_wp) arrayInput
On entry: must contain the coefficient of the Chebyshev series, for .
- 3: N – INTEGERInput
On entry: , the number of terms in the series.
- 4: S – INTEGERInput
: must have the value
according to whether the series is general, even or odd respectively (see Section 3
). For all other values of S
, the routine behaves as though
6 Error Indicators and Warnings
If an error is detected in an input parameter C06DBF will act as if a soft noisy exit has been requested (see Section 3.3.4
in the Essential Introduction).
There may be a loss of significant figures due to cancellation between terms. However, provided that is not too large, C06DBF yields results which differ little from the best attainable for the available machine precision.
The time taken increases with .
C06DBF has been prepared in the present form to complement a number of integral equation solving routines which use Chebyshev series methods, e.g., D05AAF
This example evaluates
at the point
9.1 Program Text
Program Text (c06dbfe.f90)
9.2 Program Data
9.3 Program Results
Program Results (c06dbfe.r)