You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Base.iszero not fully compatible using IntervalArithmetic values #667
In their 1.0 update, the design of IntervalArithmetic changed so that Base.iszero will throw this error when value is an interval overlapping zero:
>iszero(interval(-1, 1))
ERROR: ArgumentError:`==` is purposely not supported for
overlapping non-thin intervals. See instead `isequal_interval`
A solution using isthinzero is thus suggested, which outputs false only if the compared value is a thin zero (no other floating-point values in the interval).
This was in fact properly dealt with in their package in their /ext files. Closing this as non-issue and maybe marked as duplicate of the original issue/PR.
Example:
> mat; ## a SparseMatrixCSC of Float64> x =interval.(mat.nzval); x[1] =interval(-1, 1)
> mat = (mat.m, mat.n, mat.colptr, mat.rowval, x);
>dropzeros!(mat) ## does not throw error because `_iszero` is handled## by dispatching to `IntervalArithmetic.isthinzero` in their compatibility code.
Activity
hsuknowledge commentedon Jan 7, 2026
This was in fact properly dealt with in their package in their /ext files. Closing this as non-issue and maybe marked as duplicate of the original issue/PR.
Example:
_iszero,_isnotzero#609