sympy/sympy — pull request #1908 by demianw (2013-03-19 14:20:19+00:00)
Title: Fix c-code generation for nested conditional functions

C code generation did not work for nested Piecewise functions, I replaced the code generation from generating

p = ccode(2*Piecewise((x, x < 1), (x**2, True)))

---- original ----
2* if (x < 1) {
x
}
else {
pow(x, 2)
}

to

---- new ----
2*(x < 1) ? (
x
)
: (
pow(x, 2)
)