So I'll close this issue (because it is now ill named) and I'll work on
doing something like :
First be sure that Issue 3595 is properly closed and that :
(1/x).subs(x, 0.0) == oo
Second :
Piecewise((P1, P2), (P3, P4)) == Or(And(P1, P2), And(Not(P2), P3, P4)) when
Ps are bool, Relational or Boolean.
Does it looks better?


2013/3/5 Julien Rioux <notifications@github.com>

> In sympy/functions/elementary/tests/test_piecewise.py:
>
> > @@ -301,6 +301,12 @@ def test_piecewise_fold():
> >          piecewise_fold(p), (x, -oo, oo)) == integrate(2*x + 2, (x, 0, 1))
> >
> >
> > +def test_piecewise_cond():
> > +    p = Piecewise((0, Piecewise((cos(x) < 0, x < 1),
> > +        (1/x > 0, x >= 1))), (1, True))
>
> I found the report for the ZeroDivisionError with Float(0) at
> http://code.google.com/p/sympy/issues/detail?id=3595. I think you could
> concentrate on that to solve your immediate issue. Having And and Orshort circuit as you suggests might involve some design decisions that I
> alone am not sure if it is a good idea.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sympy/sympy/pull/1868/files#r3242446>
> .
>