This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in interpolation/akima.c.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]