[Gretl-devel] numerical_hessian

Allin Cottrell cottrell at wfu.edu
Thu May 5 08:39:19 EDT 2011


On Thu, 5 May 2011, Sven Schreiber wrote:

> Am 05.05.2011 05:11, schrieb Allin Cottrell:
>
> >
> > This is a cautionary tale: it can be more difficult that you'd
> > think, converting code from 1-based indexing to 0-based, when you
> > have nested loops to handle!
>
> Thinking about it in retrospect, I'm actually surprised that a C-coder
> like you chose 1-based indexing for gretl's language. But it probably
> helps the average user a lot. I remember that on the python-numpy list
> (python is 0-based) this used to be a repeated issue raised by new
> users, many coming from Matlab.

We use 1-based in userspace (I agree, it's in line with what most
people are likely to expect), but 0-based internally. The problem
with the Hessian came in converting from 1-based code written in
S/R to 0-based C.

Allin


More information about the Gretl-devel mailing list