parsing expressions
- Subject: parsing expressions
- From: Barton Willis
- Date: Wed, 4 Aug 2010 20:52:26 -0500
-----maxima-bounces at math.utexas.edu wrote: -----
>Thus, we have the string
> x^3*sin(x^4-1)^2-x^2+1.2;
>in the file "data_3".
>I?want?to?change?the?output?string?to
>
>??pwr(x,3)*pwr(sin(pwr(x,4)-1),2?-?pwr(x,2)?+?1.2;
(%i5) to_pow(e) := subst("^" = lambda([a,b], pwr(a,b)),e)$
(%i6) to_pow(x^3*sin(x^4-1)^2-x^2+1.2);
(%o6) pwr(x,3)*pwr(sin(pwr(x,4)-1),2)-pwr(x,2)+1.2
--Barton