|
NAG[e02rbc] NAG[nag_1d_pade_eval] - Evaluation of fitted rational function as computed by e02rac (nag_1d_pade)
|
|
Calling Sequence
e02rbc(a, b, x, ans, 'ia'=ia, 'ib'=ib, 'fail'=fail)
nag_1d_pade_eval(. . .)
Parameters
|
a - Vector(1..ia, datatype=float[8]);
|
|
|
|
b - Vector(1..ib, datatype=float[8]);
|
|
|
Constraint: if , . .
|
|
|
x - float;
|
|
|
On entry: the point at which the rational function is to be evaluated.
|
|
|
ans - assignable;
|
|
|
Note: On exit the variable ans will have a value of type float.
|
|
On exit: the result of evaluating the rational function at the given point .
|
|
|
'ia'=ia - integer; (optional)
|
|
|
On entry: the value of , where is the degree of the numerator.
|
|
Constraint: . .
|
|
|
'ib'=ib - integer; (optional)
|
|
|
On entry: the value of , where is the degree of the denominator.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_1d_pade_eval (e02rbc) evaluates a rational function at a user-supplied point, given the numerator and denominator coefficients.
|
|
Description
|
|
Given a real value and the coefficients , for and , for , nag_1d_pade_eval (e02rbc) evaluates the rational function
using nested multiplication (see Conte and De Boor (1965)).
A particular use of nag_1d_pade_eval (e02rbc) is to compute values of the Padé approximants determined by e02rac (nag_1d_pade).
|
|
Error Indicators and Warnings
|
|
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INT_ARRAY"
The first ib entries in b are zero: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_POLE_PRESENT"
Evaluation at or near a pole.
|
|
Accuracy
|
|
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.
|
|
Further Comments
|
|
The time taken is approximately proportional to .
|
|
|
Examples
|
|
>
|
ia := 5:
ib := 5:
x := 0.1:
a := Vector([1, 0.5000000000000011, 0.1071428571428577, 0.011904761904762, 0.0005952380952381046], datatype=float[8]):
b := Vector([1, -0.4999999999999989, 0.1071428571428566, -0.01190476190476179, 0.0005952380952380861], datatype=float[8]):
NAG:-e02rbc(a, b, x, ans, 'ia' = ia, 'ib' = ib):
|
|
|