e01bgf evaluates a piecewise cubic Hermite interpolant, as computed by
e01bef, at the points
, for
. The first derivatives at the points are also computed. If any point lies outside the interval from
to
, values of the interpolant and its derivative are extrapolated from the nearest extreme cubic, and a warning is returned.
If values of the interpolant only, and not of its derivative, are required,
e01bff should be used.
The routine is derived from routine PCHFD in
Fritsch (1982).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
The computational errors in the arrays
pf and
pd should be negligible in most practical situations.
The time taken by
e01bgf is approximately proportional to the number of evaluation points,
. The evaluation will be most efficient if the elements of
px are in nondecreasing order (or,
more generally, if they are grouped in increasing order of the intervals
). A
single call of
e01bgf with
is more efficient than several calls with
.
This example reads in values of
n,
x,
f and
d, and calls
e01bgf to compute the values of the interpolant and its derivative at equally spaced points.