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
d02uec.
-
1:
– const double
Input
-
On entry: , the set of arguments of the series.
Constraint:
, for .
-
2:
– Integer
Input
-
On entry: the number of evaluation points in .
Constraint:
.
-
3:
– double
Input
-
4:
– double
Input
-
On entry: the lower and upper end points respectively of the interval
. The Chebyshev series representation is in terms of the normalized variable
, where
Constraint:
.
-
5:
– const double
Input
-
On entry: must contain the coefficient of the Chebyshev series, for .
-
6:
– Integer
Input
-
On entry: , the number of terms in the series.
Constraint:
.
-
7:
– Nag_Series
Input
-
On entry: determines the series (see
Section 3).
- The series is general.
- The series is even.
- The series is odd.
Constraint:
, or .
-
8:
– double
Output
-
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).
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.
Background information to multithreading can be found in the
Multithreading documentation.