This is the mail archive of the gsl-discuss@sourceware.cygnus.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]

Re: numerical differentiation?


Hi Gerard,

I had in mind the first item of your list - calculating derivatives of
functions.  Here's where I'm headed with this: I'd be really happy to
see GSL develop to the point where it could be considered a serious
replacement for some of the tools my collaborators and I currently use
for parameter estimation in fitting analytic models to data.  That has
motivated me to do what I can to help the `multimin' code turn into
something more robust and easier to use.  And one thing that would
make the `multimin' code easier to use would be the option of using an
automatically calculated numerical gradient instead of requiring a
user-supplied routine to return the gradient.  Sure, it's not nearly
as fast or quite as accurate as using a proper routine to calculate
the true gradient for the problem at hand, but it'd be a fine tool
for a wide variety of data analyses.  It'll sure lower the cost of
entry to using GSL and speed its use among my colleagues.  All good.

Anyway, back to derivatives.  What I'd really like to see are routines
to calculate gradients for N-dimensional functions.  With those, and a
few new multimin routines, I can see how to provide functionality that
I think would benfit GSL.  I figured that starting out by contributing
code to determine numerical derivatives of 1-D functions would be a
sensible place to start.  I'd love to discuss the interfaces for these
routines.

I don't think the point you raise about the domain for
`gsl_diff_function' should be a problem.  The best step size to use
when calculating the derivative using a divided difference depends on
details of the function but it's typically O(GSL_SQRT_DBL_EPSILON), so
there's no need to wander very far away from the point at which you
want to evaluate the derivative.

Cheers,
Dave

-- 
David Morrison  Brookhaven National Laboratory  phone: 631-344-5840
                Physics Department, Bldg 510 C    fax: 631-344-3253
		          Upton, NY 11973-5000  email: dave@bnl.gov

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