On entry: must be set to the value of the th coefficient in the series, for .
3: XCAP – REAL (KIND=nag_wp)Input
On entry: , the argument at which the polynomial is to be evaluated. It should lie in the range to , but a value just outside this range is permitted (see Section 6) to allow for possible rounding errors committed in the transformation from to discussed in Section 3. Provided the recommended form of the transformation is used, a successful exit is thus assured whenever the value of lies in the range to .
4: P – REAL (KIND=nag_wp)Output
On exit: the value of the polynomial.
5: IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to , . If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is . When the value is used it is essential to test the value of IFAIL on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6 Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
, where is the machine precision. In this case the value of P is set arbitrarily to zero.
The rounding errors committed are such that the computed value of the polynomial is exact for a slightly perturbed set of coefficients . The ratio of the sum of the absolute values of the to the sum of the absolute values of the is less than a small multiple of .
8 Further Comments
The time taken is approximately proportional to .
It is expected that a common use of E02AEF will be the evaluation of the polynomial approximations produced by E02ADF and E02AFF.
Evaluate at equally-spaced points in the interval the polynomial of degree with Chebyshev coefficients, , , , , .
The example program is written in a general form that will enable a polynomial of degree in its Chebyshev series form to be evaluated at equally-spaced points in the interval . The program is self-starting in that any number of datasets can be supplied.