Re: beginner’s question with Maxi ma

[email protected]
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
> Re your s macro, there are two problems:
>
> sum auto-quotes the expression and index arguments.
> s calls sum at macro-expansion time.
>
> You can use buildq — which is specifically designed 
> for writing macro bodies — to substitute the values:
>
>   s(i, i_min, i_max, expr) ::= buildq([i,i_min,i_max,expr], sum(expr, i, i_min, i_max))$

Aha! buildq() was the missing link for allowing ∑() and ∏() to be written without resorting to LISP. [My s() macro was really ∑() without needing an alphabetic declare() call as a prerequisite.]

Thanks again for continuing to improve my awareness of Maxima’s capabilities.


_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.