[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] GSL1.15: interp.c: 150: ERROR: interpolation error

From: jeremy theler
Subject: Re: [Help-gsl] GSL1.15: interp.c: 150: ERROR: interpolation error
Date: Thu, 2 May 2013 21:10:46 -0300
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )


I have stumbled with the same issue when upgrading from 1.14 to 1.15. My fix 
consisted in checking if the argument was located in the proper range (i.e. 
between xmin and xmax) before calling gsl_interp_eval(). If it not, I just 
compute a simple linear extrapolation with the last two values of the function 

I also miss the good old days when extrapolation was automatically computed 
using the chosen interpolation scheme. Can this behavior be added as a flag or 
as a new function?

BTW, of course you are allowed to change the code. It seems to me that you are 
not re-compiling the library after modifying the source file.


On Thursday 02 May 2013 10:13:37 CRUZ-CAVALCANTI, Yanna wrote:
> Hello again,
> I understand this change is an improvement to gsl, but for now I would Just
> like to make my code work. Although, when I change the code interp.c back
> to its ancient state is like the change is never saved, even if I saved
> it. Am I allowed to do that, that is, change this code?
> Thank you for the help.
> Yanna
> -----Message d'origine-----
> De : Rhys Ulerich [mailto:address@hidden
> Envoyé : jeudi 2 mai 2013 14:13
> Cc : GSL Help Mailing List
> Objet : Re: [Help-gsl] GSL1.15: interp.c: 150: ERROR: interpolation error
> >   if (x < interp->xmin || x > interp->xmax)
> >   
> >     {
> >     
> >       GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN);
> >     
> >     }
> That is exactly the line to which I was referring.  If you are
> extrapolating using the interpolation routines (x < xmin || x > xmax),
> you get an "interpolation error" from the line in your original bug
> report.
> The changeset I mentioned was made because accidentally extrapolating
> when you meant to interpolate is wildly dangerous.  I suspect your
> code has been extrapolating all these years, and it is this recent
> defensive fix that now causes it to report an error.
> - Rhys

reply via email to

[Prev in Thread] Current Thread [Next in Thread]