e01bgc evaluates a piecewise cubic Hermite interpolant, as computed by the NAG function
e01bec, 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,
e01bfc should be used.
The function is derived from routine PCHFD in
Fritsch (1982).
The computational errors in the arrays
pf and
pd should be negligible in most practical situations.
Background information to multithreading can be found in the
Multithreading documentation.
The time taken by
e01bgc 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
e01bgc with
is more efficient than several calls with
.
This example program reads in values of
n,
x,
f and
d and calls
e01bgc to compute the values of the interpolant and its derivative at equally spaced points.