Help calling maxima functions from lisp



1.  I'm not sure why you need this in lisp, if maxima code does it.
2.  foo(x):=?subst(pow,?mexpt,x);  may do what you want.
3.  or not... foo(x^2+a/b)  returns pow(x,2)+a*pow(b,-1).

RJF

Robert Dodier wrote:
> On Feb 12, 2008 1:12 PM, Daniel Cabrini Hauagge
> <daniel.hauagge at gmail.com> wrote:
>
>   
>> What I'm trying to do is get this into lisp
>>
>>   exp_trans: scanmap(lambda([xx],
>>       if mapatom(xx) or op(xx) # "^" then xx
>>       else pow(args(xx)[1], args(xx)[2])), exp);
>>     
>
> I think the easiest thing to do is make the above snippet into a function
> and put it in a separate .mac file, load the .mac, and then call the
> function via MFUNCALL.
>
> ------------ my_xform.mac ------------
> my_xform (e) := scanmap (blah blah blah, e);
>
>
> ------- somewhere in my_f90.lisp -------
> ($load "my_xform.mac")
> ...
> (setq my-new-expr (mfuncall '$my_xform my-expr))
> ...
>
> HTH
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>