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
Oleh
16 жовтня 2017, 04:33:56, від "Allin Cottrell" <cottrell(a)wfu.edu>:
On Sun, 15 Oct 2017, > oleg_komashko(a)ukr.net wrote:
> Thank you, Allin
> If I do not mistake the thing
> I want to try use libc only
> so, hopefully, there will
> be no problems with include
If your thoughts tend in the direction of complex matrices, maybe I
should point out that we have a few "hidden" hansl functions for
complex operations.
They're hidden because we don't have a native complex-matrix type,
and also because the API is still negotiable, but... our current
internal representation of an m x n complex matrix is a 2*m x n
gretl matrix, where the doubling of the number of rows means that
each complex element occupies two rows (real, then imaginary).
The functions available are (yes, the leading underscore is part of
the name):
_ceigh: eigen-decomposition of complex (Hermitian) matrix
_cinv: inverse of a complex matrix via LU decomposition
_cmmult: multiplication of complex matrices
_chprod: Hadamard product of complex matrices
_cmatrix: compose a complex matrix from its real and imaginary
component matrices
_cfft: complex Fourier transform
_cxtract: extract the real or complex part of a complex matrix
_ctran: conjugate transpose of complex matrix
You can inspect the C code in lib/src/gretl_cmatrix.c. We use
OpenBLAS functionality for the more substantial operations.
Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.eduhttp://lists.wfu.edu/mailman/listinfo/gretl-devel