This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Bug in interpolation/akima.c.
- To: gsl-discuss at sourceware dot cygnus dot com
- Subject: Bug in interpolation/akima.c.
- From: Toby White <tow at theor dot ch dot cam dot ac dot uk>
- Date: Fri, 20 Oct 2000 10:28:54 +0100
- Organization: Cambridge University Chemical Laboratory, Theoretical Sector
- Reply-To: Toby White <tow at theor dot ch dot cam dot ac dot uk>
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