Subject: New function - makelist alternative: table()
From: Stavros Macrakis
Date: Sun, 10 May 2009 17:11:53 -0400
On Sun, May 10, 2009 at 4:37 PM, ?iga Lenar?i? <ziga.lenarcic at gmail.com> wrote:
> On 10. May, 2009, at 8:58 PM, Stavros Macrakis wrote:
> The complex case though is wierd though - iteration is not defined as well
> as in real number cases.. It can be made to work, but I fear it is somewhat
> confusing...
I was just pointing out incompatibilities. It may be OK not to
support the range a..a+3 or 1+%i .. 3 + %i. There are ways to do it,
but it is certainly a complication.
> The case of a[i] brings up a question - right now $table checks the first
> element (variable) of the iterator with $symbolp. How should I check it to
> allow a[i], but not some wierd cases (like sin(x))?
It is easy to detect and allow subscripted variables like a[i]; what
is harder is binding them.... This is presumably why makelist uses an
inefficient mechanism. Also, if you avoid Maxima's standard setting
mechanism, you will run into bugs like this one:
table(%e,[%e,1,3]) => [1,2,3] !!!!
Note that create_list has this same bug.
-s
PS There is a bug in the current version of Maxima that incorrectly
allows %i:3 but correctly disallows %e:3.