I think the best output in this case is a Piecewise expression,
similar to what integrate does for integrate(x**y, x).

Aaron Meurer

On Sat, Feb 8, 2014 at 11:19 AM, Avichal Dayal <[email protected]> wrote:
> How about this:-
> We can replace sign(var) with {-1, 1} in the _contains method
> Any operation on the Set will be done on both -1 and 1. Final expression
> we get will be a set. Then check if it is in [-oo, oo]
>
> E.g.:- a*sign(x) + b
> => {-a, a} + b
> => {-a+b, a+b}
>
> I tried to implement but I'm having some trouble. How to separate a SymPy
> expression
> into basic components? For e.g.:- a*b + c should give me a, b and c
> separately
>
> --
> 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.

-- 
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.

Reply via email to