[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Necessity of providing f, df, _and_ fdf?
From: |
Brian Gough |
Subject: |
Re: [Help-gsl] Necessity of providing f, df, _and_ fdf? |
Date: |
Wed, 21 Jan 2009 15:06:32 +0000 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI) |
At Mon, 19 Jan 2009 18:20:56 -0500,
Liam Healy wrote:
> Is possible to change GSL to allow f & df _or_ fdf instead of "and",
> say providing a null pointer for the unneeded function. If that's
> already the case, can the documentation be made clear?
Hello,
To keep things simple using a NULL pointer is not supported -- the
recommended way is to make a small function fdf which calls f and df.
> In a related puzzle, I find this statement about fdf hard to understand:
> "This function provides an optimization of the separate functions for
> f(x) and g(x)—it is always faster to compute the function and its
> derivative at the same time. "
> The user is providing the function, so whether it's an optimization or
> not depends on how it's written. It seems like an overstatement that
> it's "always" faster to compute the function and its derivative at the
> same time; I'm willing to believe it's (essentially) at least as fast
> perhaps.
I was thinking that for analytic functions, at least, the function and
the derivative always have some terms in common so it is faster to
compute them together.
--
Brian Gough