gk <g_k### [at] mail333com> wrote:
> >* DESCRIPTION
> >* calculates the interpolation between f[1] and f[2] at position x
> >* using the cubic function given by:
> >*
> >* ( [-0.5 1.5 -2.5 0.5 ] [f[0]] )
^^^
Typo. Should read -1.5.
> > DBL val;
> > val=(-0.5*f[0] + 1.5*f[1] - 1.5*f[2] + 0.5*f[3])*x*x*x
> > +( 1.0*f[0] - 2.5*f[1] + 2.0*f[2] - 0.5*f[3])*x*x
> > +(-0.5*f[0] + 0.5*f[1] )*x
^^^^
Aargh. :-/
Another Typo. Should be f[2]. Indentation is correct here.
Lutz-Peter
Post a reply to this message
|