I don't know if this will do anywhere near what you want... http://swiginac.berlios.de/ is a set of Python bindings to GiNaC, which handles symbolic maths in C/C++. Matt