Bug in interpolation/akima.c.

Toby White tow@theor.ch.cam.ac.uk
Fri Oct 20 02:28:00 GMT 2000


The offending part is at line 161; inside the loop

   for (i = 0; i < interp->size; i++)
     {
      ...
      double h_i = x_array[i + 1] - x_array[i];
      ...
      }

However, x_array is generally going to be of length interp->size,
with obvious consequences on the last loop iteration.

Unfortunately, I know nothing of how a natural akima spline works,
or I'd offer a patch.

Toby

-- 
Toby White, University Chemical Lab., Lensfield Road, Cambridge. CB2 1EW. U.K.
<tow@theor.ch.cam.ac.uk> for archival and encrypted mail. GPG Key ID: 1DE9DE75
<toby.white@vodafone.net> for immediate attention.
Web: http://ket.ch.cam.ac.uk/people/tow/index.html
Tel: +44 1223 336423
Fax: +44 1223 336362



More information about the Gsl-discuss mailing list