bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] GSL interpolation


From: Jens Chluba
Subject: [Bug-gsl] GSL interpolation
Date: Thu, 26 Jul 2012 14:39:21 -0400

Hi there,

just a comment on the new convention for interpolation. Round-off error lead to 
problems with

  if (x < interp->xmin || x > interp->xmax)
    {
      GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN);
    }

if indeed x very close to the boundaries but within the interval [xmin, xmax]. 
It is probably better to put something like

  if (x < interp->xmin*(1.0-1.0e-14) || x > interp->xmax*(1.0+1.0e-14))
    {
      GSL_ERROR_VAL("interpolation error", GSL_EDOM, GSL_NAN);
    }

This allows for a tiny range of extrapolation but fixes the round-off error 
problem.

In addition, I was wondering if the GSL team could be interested in some pretty 
fast and accurate integration schemes based on the Patterson quadrature rules? 
These are fully nested and converge very rapidly. I have the required c++ code 
and will be happy to provide them. Certainly, this can only be a base for GSL, 
since you guys have much higher coding standards...

Cheers,

Jens

-------------------------------------------------------------------------------------------------------------
Jens Chluba                                             Tel.  ++1 416 978 5946 
or ++1 416 262 8224
Senior Research Associate                       Fax  ++1 416 978 3921
CITA, University of Toronto                       .+'''+.             .+'''+.
60 St. George Street                            mailto:address@hidden
Toronto, Ontario M5S 3H8                        '+...+'          '+...+'
Canada                                                  
http://www.cita.utoronto.ca/~jchluba/
-------------------------------------------------------------------------------------------------------------








reply via email to

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