On entry: , for , must contain the value of the coefficient in the denominator of the rational function.
if , .
4: IB – INTEGERInput
On entry: the value of , where is the degree of the denominator.
5: X – REAL (KIND=nag_wp)Input
On entry: the point at which the rational function is to be evaluated.
6: ANS – REAL (KIND=nag_wp)Output
On exit: the result of evaluating the rational function at the given point .
7: 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:
The rational function is being evaluated at or near a pole.
when (so the denominator is identically zero).
A running error analysis for polynomial evaluation by nested multiplication using the recurrence suggested by Kahan (see Peters and Wilkinson (1971)) is used to detect whether you are attempting to evaluate the approximant at or near a pole.
8 Further Comments
The time taken is approximately proportional to .
This example first calls E02RAF to calculate the Padé approximant to , and then uses E02RBF to evaluate the approximant at .