In the current status of this PR, I think this is the only small improvement we can get.
For instance, removing isempty_interval(x) & isempty_interval(y) && return x breaks a few things since:
internally the bounds of an empty interval are NaN (unless we are using intervals with rational bounds); this was done for extra safety IIRC since NaN propagates
but publicly, inf and sup on an empty interval return Inf and -Inf respectively; to comply with the standard
Unless you are still trying things out, I suggest to close this PR.
In https://github.com/JuliaIntervals/IntervalArithmetic.jl/pull/664 I added a feature of this PR: the resulting decoration does not depend on
decoration(r)
.In the current status of this PR, I think this is the only small improvement we can get. For instance, removing
isempty_interval(x) & isempty_interval(y) && return x
breaks a few things since:NaN
(unless we are using intervals with rational bounds); this was done for extra safety IIRC since NaN propagatesinf
andsup
on an empty interval returnInf
and-Inf
respectively; to comply with the standardUnless you are still trying things out, I suggest to close this PR.