Hi Davide,
Interval is a type of Set whereas both AccumulationBounds and SetExpr
are types of Expr. The methods and operations of Set and Expr are very
different and not interchangeable so if we want to be able to
manipulate an AccumBounds like an expression then it can't be a
subclass of Interval.
The difference between SetExpr and AccumBounds is that AccumBounds is
only a bound so its arithmetic does not need to be exact e.g.:
In [10]: 1 / SetExpr(Interval(-1, 1))
Out[10]: SetExpr((-∞, -1] ∪ [1, ∞))
In [11]: 1 / AccumBounds(-1, 1)
Out[11]: <-∞, ∞>
Here both results are correct. The AccumBounds is correct because it
"bounds the result". The SetExpr result is correct because anything
between -1 and 1 is not included in the set. Interval arithmetic can
give either result depending on whether you work with intervals or
unions of intervals (multi-intervals).
The normal idea of interval arithmetic though is to use floating point
with outer rounding. I have an implementation of multi-intervals based
on mpmath's mpi type here:
https://github.com/sympy/sympy/issues/19164
Oscar
> --
> 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
sympy+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/14b860f2-5e29-4dd0-9cd3-74b92fc6a2c6o%40googlegroups.com.