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