Charles Henry czhenry at gmail.com
Wed Jun 25 06:50:06 CEST 2008

```On Tue, Jun 24, 2008 at 9:24 PM, Mathieu Bouchard <matju at artengine.ca> wrote:

> I don't think that more than one alternative will be necessary. For 4-point
> table lookups that go through all the original points, I don't know why
> anyone would aim lower than a C2 piecewise-polynomial. Unfortunately, it
> would be somewhat too late to just call it [tabread4~]. Or not.

How low is too low? hmmm....
tabread4~ is deficient as Cyrille pointed out, because the resulting
function is not continuously differentiable (thanks for the
correction).  So, what characteristics would be best for a "fast"
interpolating function?

When we have an interval between samples, we wish to fit a polynomial
(because it's fast, I guess) that satisfies our constraints.
We could specify the polynomial has the same values at x[-1],x,
x, x (tabread4~).  Four constraints, determines a cubic
polynomial, works out as a linear algebra problem.

or we could set x,x and x'=(x-x[-1])/2 and x'=(x-x)/2
again, 4 constraints, cubic polynomial, etc...

or another 4 point scheme, with continuous 2nd derivative
setting x, x, x'=(x-x[-1])/2 and x'=(x-x)/2
and x''=x-2*x+x[-1] and x''=x-2*x+x
6 constraints, 5th degree polynomial

and if you additionally wanted it to actually go through x[-1] and
x, it would be 7th degree

So, even for 4-point interpolation, there are some options that could