title: Sympy code generation for complicated expressions - interim variables?
body: <p>I'm trying to figure out how to generate C code for complicated expressions in sympy. The examples I could find by googleing are trivial, i.e., generate code for f[i] = x[i]*y[i].</p>
  
  <p>What I'd like to do is generate things for more complicated expressions, for example</p>
  
  <pre><code>f[i] = x[i] y[x[i]]
  </code></pre>
  
  <p>where y can be a more complicated function of x, for instance</p>
  
  <pre><code>y(x) = y_0 + y_1*z(x) + y_2*z(x)^2
  z(x) = z_0 + z_1*x + z_2*x^2
  </code></pre>