When computing with intervals (ref. IntervalArithmetic), the order in which an evaluation is performed matters. A simple example is
julia> using IntervalArithmetic
julia> a, b = -1..1, 2..3
[-1, 1]
julia> (a+b)*b
[2, 12]
julia> a*b + b*b
[1, 12]
The example shows that evaluating the factored expression gives a better (tighter) result than using the expanded expression.
Have you considered a "lazy" multiplication of polynomials within this package, such that the expression is hold until asked to be evaluated (i mean expanded symbolically)? A "factor" function would also help, but if it exists, i didn't see it. There is this related issue, but it hasn't received much attention.
To illustrate my use case in a concrete example, consider:
When computing with intervals (ref. IntervalArithmetic), the order in which an evaluation is performed matters. A simple example is
The example shows that evaluating the factored expression gives a better (tighter) result than using the expanded expression.
Have you considered a "lazy" multiplication of polynomials within this package, such that the expression is hold until asked to be evaluated (i mean expanded symbolically)? A "factor" function would also help, but if it exists, i didn't see it. There is this related issue, but it hasn't received much attention.
To illustrate my use case in a concrete example, consider: