[Maxima] New function - makelist alternative: table()
macrakis at alum.mit.edu
Sun May 10 16:11:53 CDT 2009
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
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.
PS There is a bug in the current version of Maxima that incorrectly
allows %i:3 but correctly disallows %e:3.
More information about the Maxima