Am 25.10.2014 um 20:53 schrieb Aaron Meurer:
See my comment on the issue. I'm not really sure what should be done
on Piecewise here.

The alternative that I see would be whether we want to be strict or lazy.
Strict checking means you can't construct a Piecewise by using numbers that have an imaginary part. Lazy checking means we check only when actually executing the comparison.

With lazy checking, we'd gain the ability to ignore inconsequential errors - i.e. if a boundary is defined via some complicated expression that we don't know whether it has an imaginary component, but it's irrelevant because the whole thing happens to be multiplied by zero.

If strict checking is desired, the real work would be to check all code paths that enter something into a boundary, and make sure that every one has a check for real-ness. If lazy checking is desired, the real work would be to make sure that the comparisons will fail if the boundary isn't real.

> I would try making and using some Piecewise
expressions that don't make sense because the conditions are not real
and see what happens, and if it's not expected, that's something that
should be improved.

That's a good first smoke test.
I'd still recommend doing the code analysis - hargup wasn't sure whether everything is okay, so the code wasn't clear enough as it stands. Maybe Harsh Gupta can comment where he'd have expected to see whether it's all okay?

Regards,
Jo

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/544CDADD.7070404%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to