Dear Riccardo,
It's very simple:
the step size is $macheps and
the precision does not depends
on x
Oleh
P.S. I have send before
the version using R
Is is practically as exact
as automatic differentiation
See the attachment for precision tests
16 жовтня 2017, 14:13:47, від "Riccardo (Jack) Lucchetti"
<r.lucchetti(a)univpm.it>:
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.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti@univpm.ithttp://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.eduhttp://lists.wfu.edu/mailman/listinfo/gretl-devel