On Sun, 6 Nov 2011, Andreas Noack Jensen wrote:
There is a problem with the eigsolve function. I am on the latest
cvs and a 64 bit Linux. Th code
A = I(2)
B = I(2)
C = {}
eigsolve(A, B, &C)
eigsolve(A, B, C)
print C
shows the problem and I think it can be solve if geneval.c line
6181 is substituted by something like
} else if (r->t != EMPTY && r->t != U_ADDR) {
/* optional matrix-pointer */
node_type_error(f, 3, U_ADDR, r, p);
} else {
const char *rname;
rname = (r->t == U_ADDR)? r->v.b1.b->v.str : "null";
A = user_gensymm_eigenvals(l->v.m, m->v.m, rname, &p->err);
}
inspired by the normal eigenvalue function. I don't know if it is
the right fix but at least it runs.
Thanks, Andreas! I hope this doesn't sound patronizing, but I'm
impressed that you managed to find your way around the gretl code,
and moreover found the correct fix for the bug. The fix is now in
CVS.
Allin Cottrell