Hi All,

Attached is the code for generating C/C++ code from a GiNaC expression that pulls out subexpressions and declares them up front so that they only have to be evaluated once.  The .hh file has documentation and a simple usage example.

I hope this is useful.

I used it to reduce 50MB of code to under 300K and improved the running time dramatically.

-Doug

Support NPR 20 seconds at a time. www.twentysecondsatatime.org