C code generation



Try

(C1) subst(pow,"^",a^b + c);
(D1)                         c + pow(a, b)
(C2) 

Barton

"Michael Borland" <mdborland@hotmail.com>
Sent by: maxima-admin@www.ma.utexas.edu
11/18/2002 09:24 PM
 
        To:     maxima@www.ma.utexas.edu
        cc: 
        Subject: [Maxima] C code generation


I need to generate C code from the results of maxima.  The string() 
command
almost does it, except it uses a^b form for powers and C doesn't have the 
^
operator.  My expressions are quite large, so it would be very difficult
to go through and substitute pow() in each instance.

Also, maxima doesn't generate output of the form
E1 = {expression}
but simply gives
{expression}
Since I'm generating dozens of results it would be nice to have them
labeled.

Any suggestions will be appreciated.

--Michael