On Tue, Oct 8, 2013 at 1:58 PM, Ondřej Čertík <[email protected]> wrote:
> Nathan,
>
> I am working on a fix.
>
> Can you provide the exact C expression that you want Piecewise((0, x <
> 0.5), (1, x >= 0.5)) to generate?
> I.e. can you fill in the right hand side here:
>
> assert ccode(Piecewise((0, x < 0.5), (1, x >= 0.5))) == "piecewise(...)"
Ok, it actually works... It produces:
if (x < 0.5) {
0
}
else if (x >= 0.5) {
1
}
But obviously this will not work inside an expression. Can you provide
us the exact C code that you expect
for your expression?
Ondrej
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.