On Wednesday, March 25, 2015 at 5:29:18 PM UTC+1, Aaron Meurer wrote: > > Wow, I didn't know integrate supported Intervals.
I had a look at the code, I think that behaviour is unintended. The point is, the stats module apparently calls *integrate* with intervals to determine probabilities. If we are going to > support sets, we might as well support all of them (at least > unevaluated). A union of intervals is easy if the values are > computable (i.e., if you can determine if the union is disjoint). > Otherwise, it's complicated. Integrate(1, (x, Union(Interval(a, b), > Interval(c, d)))) depends on the relative order of a, b, c, and d. > Even the current integrate(1, (x, Interval(a, b))) is wrong if b > a. > I guess that if the relative order cannot be determined, the integral should remain unevaluated. Is is worth if I try to create a PR to accept unions of intervals? -- 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/361c5845-693a-4e5a-910b-b2abba807e48%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
