[Maxima] programming, using op(), was ..RE: Bugfix for GosperSum? (was: cannot load Zeilberger)
biomates at telefonica.net
Sun Jan 7 02:09:09 CST 2007
El sáb, 06-01-2007 a las 18:27 -0700, Robert Dodier escribió:
> On 1/6/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> > Also, be aware that op() takes a fair amount of time and space,
> > since it formats its argument.
> If op is a bottleneck for many programs, we should work on
> speeding up nformat then. Better than than to tell every user
> to use a more obscure alternative.
> > Else case(inpart(expr,0),
> > ["+", yyy],
> > ["*", zzz],
> > [otherwise, ...])
> I'm not opposed to having a case statement, but I don't like
> constructs that don't distinguish the different parts.
> I don't think a list of 2-element expressions has anything to
> recommend it, except it would be easy to implement.
> Better would be something more explicit like
> FOO (expr, case "+" : yyy, case "*" : zzz, otherwise : ...)
I vote for something like
There are other situations in Maxima ('depends', for example) where the
meaning of an argument depends on its position in the arguments list.
Mario Rodriguez Riotorto
More information about the Maxima