sympy/sympy — pull request #2369 by mrocklin (2013-08-09 15:44:24+00:00)
Title: WIP:  Adding to C code generation

The `CCodePrinter` supports only a minimal set of functions (arithmetic, trig, exp, array indexing) and is missing out on lots of the power SymPy has to offer on advanced mathematical expressions.

To add to that it doesn't fail gracefully and often gives wrong results. For example, printing the SymPy expression `gamma(x)` yielded the C code `gamma(x)` which is, unfortunately, not the correct call. Instead we need the C code to be `tgamma(x)`. These changes are simple and powerful.

This work is alongside connecting the SymPy C code generator to Theano in https://github.com/Theano/Theano/pull/1486