On 16 Oct 2017, at 13:13, Riccardo (Jack) Lucchetti
<r.lucchetti(a)univpm.it> wrote:
On Mon, 16 Oct 2017, oleg_komashko(a)ukr.net wrote:
> Thank you, Allin
> Also, does it contain
> elementary functions
> in complex argument e.g.
> exp(), log(), etc as in libc?
> I can't tell on the future,
> what I want to do now
> is to make gradient and Hessian
> for real functions of real arguments
> with imaginary steps inside:
> e.g. for gradient:
> Im(f(x+i*delta_x)-f(x))/delata_x
>
> It is very exact, but very slow
> if it is not coded in c
> Due to the nature of complex numbers
> delta_x = $macheps for any real x
> The precision does not depends on x
> That's why it is so exact
I fail to see how this approach can give more precise results than the mechanism we have
now.
See "The Complex-Step Derivative Approximation" in
ACM Transactions on Mathematical Software, Vol. 29, No. 3, September 2003, Pages 245–262.
and the Reference manual of the R numDeriv package
(
https://cran.r-project.org/web/packages/numDeriv/numDeriv.pdf)
assuming that Gretl is not using the complex step method.
And assuming that the functions to be differentiated can handle complex values.
Berend Hasselman
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel