nag_1d_everett_interp (e01abc) interpolates a function of one variable at a given point from a table of function values evaluated at equidistant points, using Everett's formula.
nag_1d_everett_interp (e01abc) interpolates a function of one variable at a given point
where
and
is the interval of differencing, from a table of values
and
where
. The formula used is that of
Fröberg (1970), neglecting the remainder term:
The values of
and
are stored on exit from the function in addition to the interpolated function value
.
In general, increasing
improves the accuracy of the result until full attainable accuracy is reached, after which it might deteriorate. If
lies in the central interval of the data (i.e.,
), as is desirable, an upper bound on the contribution of the highest order differences (which is usually an upper bound on the error of the result) is given approximately in terms of the elements of the array
g by
, where
,
,
,
,
for
respectively, thereafter decreasing roughly by a factor of
each time.
nag_1d_everett_interp (e01abc) is not threaded in any implementation.
This example interpolates at the point
from the function values
We take
and
.