Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(arith): Do not expose unnormalized intervals in only_borne_XXX (#…
…1081) The `only_borne_sup` and `only_borne_inf` functions have been introduced in 0968433 and are intended to only take in consideration upper and lower bounds of an interval, respectively. These functions work by replacing the lower (resp. upper) bound of each interval in an union by negative (resp. positive) infinities, leading to bogus and non-normalized representations; for instance, computing `only_borne_inf` on the union (which we will assume is normalized, i.e. a < b < c < d): [a, b] U [c, d] returns [a, +oo[ U [c, +oo[ which should be just [a, +oo[ This does not cause issues currently because we always ultimately call `borne_sup` (resp. `borne_inf`) on these, but these functions should not return such bogus intervals in the first place. This patch changes functions `only_borne_sup` and `only_borne_inf` to only return the last (resp. first) interval in the union, ensuring that their result is always a single normalized interval without change of semantics.
- Loading branch information